nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit d0869061367de78955f3c47b07246eca2e1df45a
parent c81532c15a3f78af133eb8370a1aeb9a631a1ae0
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 22 Apr 2020 03:12:00 +0300

gpxsee-maps: insert api keys

Diffstat:
Mpkgs/data/maps/gpxsee-maps/default.nix | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/pkgs/data/maps/gpxsee-maps/default.nix b/pkgs/data/maps/gpxsee-maps/default.nix @@ -1,13 +1,25 @@ -{ stdenv, sources }: +{ stdenv +, sources +, maptilerApiKey ? "" +, mapboxApiKey ? "" +}: stdenv.mkDerivation rec { pname = "gpxsee-maps"; version = stdenv.lib.substring 0 7 src.rev; src = sources.gpxsee-maps; + postPatch = '' + substitute World/MapTiler.tpl World/MapTiler.xml \ + --replace "insert-your-apikey-here" "${maptilerApiKey}" + substitute World/Mapbox.tpl World/Mapbox.xml \ + --replace "insert-your-apikey-here" "${mapboxApiKey}" + ''; + installPhase = '' install -dm755 "$out/share/gpxsee/maps" cp -r World "$out/share/gpxsee/maps" + find $out -name "*.tpl" | xargs rm ''; meta = with stdenv.lib; {