nur-packages

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

commit 0af3f596fade7a7bfcfdc237d2941ac90c49df27
parent ab303622c380147de974c7de2644ff96d1e8ae1c
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed,  5 Aug 2020 11:22:57 +0300

Join *-dem packages into dem

Diffstat:
Apkgs/data/maps/dem/default.nix | 32++++++++++++++++++++++++++++++++
Apkgs/data/maps/dem/dem1.json | 46++++++++++++++++++++++++++++++++++++++++++++++
Dpkgs/data/maps/gpxsee-dem/default.nix | 59-----------------------------------------------------------
Dpkgs/data/maps/qmapshack-dem/default.nix | 60------------------------------------------------------------
Mpkgs/default.nix | 3+--
5 files changed, 79 insertions(+), 121 deletions(-)

diff --git a/pkgs/data/maps/dem/default.nix b/pkgs/data/maps/dem/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, unzip, gdal }: +let + dem1 = builtins.fromJSON (builtins.readFile ./dem1.json); +in +stdenv.mkDerivation { + pname = "dem"; + version = "2014-05-25"; + + srcs = stdenv.lib.mapAttrsToList (name: spec: fetchurl spec) dem1; + + unpackPhase = "for src in $srcs; do ${unzip}/bin/unzip $src; done"; + + dontConfigure = true; + dontBuild = true; + dontFixup = true; + + preferLocalBuild = true; + + installPhase = '' + install -Dm644 **/*.hgt -t $out + ${gdal}/bin/gdalbuildvrt $out/SRTM.vrt $out/*.hgt + ''; + + meta = with stdenv.lib; { + description = "Digital Elevation Data"; + homepage = "http://www.viewfinderpanoramas.org/"; + license = licenses.free; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.all; + skip.ci = true; + }; +} diff --git a/pkgs/data/maps/dem/dem1.json b/pkgs/data/maps/dem/dem1.json @@ -0,0 +1,46 @@ +{ + "R34": { + "url": "http://viewfinderpanoramas.org/dem1/R34.zip", + "sha256": "0bd57zdhj16yg4cxjicc353jh3vd61f994ciw1jd0nmm6856banz" + }, + "R35": { + "url": "http://viewfinderpanoramas.org/dem1/R35.zip", + "sha256": "0zha36s96i5jbqvmfc4lgsbd8xs20ynqzydkanzb3rfygrnd6l5f" + }, + "R36": { + "url": "http://viewfinderpanoramas.org/dem1/R36.zip", + "sha256": "0c7m3wl2crid7vmiz2zzj0j0b6vsh174mdnr3rkbjfwpnxhkil34" + }, + "Q34": { + "url": "http://viewfinderpanoramas.org/dem1/Q34.zip", + "sha256": "0371kqy9k9g9118fcp1afs932w67drpxjwyrij8dsdns5bi6llls" + }, + "Q35": { + "url": "http://viewfinderpanoramas.org/dem1/Q35.zip", + "sha256": "0lvm43v03i80v6b9phwbd3mdhqi6y2iklgp4cc0qx56pg7z6wdaa" + }, + "Q36": { + "url": "http://viewfinderpanoramas.org/dem1/Q36.zip", + "sha256": "1l05ljhxdyh2lb5ydlr4xfjbx4lvg6g2a2fg097yqhw95n3xxqv1" + }, + "P34": { + "url": "http://viewfinderpanoramas.org/dem1/P34.zip", + "sha256": "0njk4svh7gq6ashda1aqy55aj3x25xl1f3ykj1jmy0kl5k9zz8z1" + }, + "P35": { + "url": "http://viewfinderpanoramas.org/dem1/P35.zip", + "sha256": "093zz7yx8kcykip83k8gzby9l6lx03nsvzjw21axjlbd48fl26ac" + }, + "P36": { + "url": "http://viewfinderpanoramas.org/dem1/P36.zip", + "sha256": "15icmvc2md6g9a89ln4ckkclynfhcf21yabfcr7azp7ivy23f46i" + }, + "O34": { + "url": "http://viewfinderpanoramas.org/dem1/O34.zip", + "sha256": "0gaxkfam9bf5my5i3ivvpm32y866cyd0lz2j6h535xqjza5w374n" + }, + "O35": { + "url": "http://viewfinderpanoramas.org/dem1/O35.zip", + "sha256": "0wc5l7vcm33qkmbmjaij2mkxv59922150qjabjhhxqaf7xxv3q65" + } +} diff --git a/pkgs/data/maps/gpxsee-dem/default.nix b/pkgs/data/maps/gpxsee-dem/default.nix @@ -1,59 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -stdenv.mkDerivation { - pname = "gpxsee-dem"; - version = "2014-05-25"; - - srcs = [ - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/O35.zip"; - sha256 = "0wc5l7vcm33qkmbmjaij2mkxv59922150qjabjhhxqaf7xxv3q65"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P35.zip"; - sha256 = "093zz7yx8kcykip83k8gzby9l6lx03nsvzjw21axjlbd48fl26ac"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P36.zip"; - sha256 = "15icmvc2md6g9a89ln4ckkclynfhcf21yabfcr7azp7ivy23f46i"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q35.zip"; - sha256 = "0lvm43v03i80v6b9phwbd3mdhqi6y2iklgp4cc0qx56pg7z6wdaa"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q36.zip"; - sha256 = "1l05ljhxdyh2lb5ydlr4xfjbx4lvg6g2a2fg097yqhw95n3xxqv1"; - } - ) - ]; - - unpackPhase = "for src in $srcs; do ${unzip}/bin/unzip $src; done"; - - dontConfigure = true; - dontBuild = true; - - preferLocalBuild = true; - - installPhase = '' - install -Dm644 **/*.hgt -t $out/share/gpxsee/DEM - ''; - - meta = with stdenv.lib; { - description = "Digital Elevation Data"; - homepage = "http://www.viewfinderpanoramas.org/"; - license = licenses.free; - maintainers = [ maintainers.sikmir ]; - platforms = platforms.all; - skip.ci = true; - }; -} diff --git a/pkgs/data/maps/qmapshack-dem/default.nix b/pkgs/data/maps/qmapshack-dem/default.nix @@ -1,60 +0,0 @@ -{ stdenv, fetchurl, unzip, gdal }: - -stdenv.mkDerivation { - pname = "qmapshack-dem"; - version = "2014-05-25"; - - srcs = [ - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/O35.zip"; - sha256 = "0wc5l7vcm33qkmbmjaij2mkxv59922150qjabjhhxqaf7xxv3q65"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P35.zip"; - sha256 = "093zz7yx8kcykip83k8gzby9l6lx03nsvzjw21axjlbd48fl26ac"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P36.zip"; - sha256 = "15icmvc2md6g9a89ln4ckkclynfhcf21yabfcr7azp7ivy23f46i"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q35.zip"; - sha256 = "0lvm43v03i80v6b9phwbd3mdhqi6y2iklgp4cc0qx56pg7z6wdaa"; - } - ) - ( - fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q36.zip"; - sha256 = "1l05ljhxdyh2lb5ydlr4xfjbx4lvg6g2a2fg097yqhw95n3xxqv1"; - } - ) - ]; - - unpackPhase = "for src in $srcs; do ${unzip}/bin/unzip $src; done"; - - dontConfigure = true; - dontBuild = true; - - preferLocalBuild = true; - - installPhase = '' - install -Dm644 **/*.hgt -t $out/share/qmapshack/DEM - ${gdal}/bin/gdalbuildvrt $out/share/qmapshack/DEM/SRTM3.vrt $out/share/qmapshack/DEM/*.hgt - ''; - - meta = with stdenv.lib; { - description = "Digital Elevation Data"; - homepage = "http://www.viewfinderpanoramas.org/"; - license = licenses.free; - maintainers = [ maintainers.sikmir ]; - platforms = platforms.all; - skip.ci = true; - }; -} diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -52,8 +52,8 @@ lib.makeScope newScope ( gpsmap64 = callPackage ./data/firmwares/gpsmap64 { }; + dem = callPackage ./data/maps/dem { }; freizeitkarte-osm = callPackage ./data/maps/freizeitkarte-osm { }; - gpxsee-dem = callPackage ./data/maps/gpxsee-dem { }; gpxsee-maps = callPackage ./data/maps/gpxsee-maps { }; gpxsee-poi = callPackage ./data/maps/gpxsee-poi { }; hiblovgpsmap = callPackage ./data/maps/hiblovgpsmap { }; @@ -62,7 +62,6 @@ lib.makeScope newScope ( opentopomap = callPackage ./data/maps/opentopomap { }; qmapshack-onlinemaps = callPackage ./data/maps/qmapshack-onlinemaps { }; qmapshack-routinodb = callPackage ./data/maps/qmapshack-routinodb { }; - qmapshack-dem = callPackage ./data/maps/qmapshack-dem { }; slazav-hr = callPackage ./data/maps/slazav/hr.nix { }; slazav-podm = callPackage ./data/maps/slazav/podm.nix { };