commit ebe187ba9e854f9f1795214907e262de1092b4b5
parent f0c810228e86a5e04c28711275376951aadd1b92
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Fri, 22 Oct 2021 14:50:28 +0300
Up
Diffstat:
4 files changed, 34 insertions(+), 50 deletions(-)
diff --git a/pkgs/data/misc/osm-extracts/default.nix b/pkgs/data/misc/osm-extracts/default.nix
@@ -1,50 +1,36 @@
-{ lib, stdenv, fetchurl, gdal, osmium-tool }:
-let
- regions = [
- "RU-ARK"
- "RU-VLG"
- "RU-KGD"
- "RU-KR"
- "RU-KO"
- "RU-LEN"
- "RU-MUR"
- "RU-NEN"
- "RU-NGR"
- "RU-PSK"
- "RU-SPE"
- ];
-in
-{
- admin-boundaries = stdenv.mkDerivation rec {
- pname = "osm-admin-boundaries";
- version = "210905";
+{ lib, stdenv, fetchurl, osmium-tool, region ? "RU-LEN" }:
- src = fetchurl {
- url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf";
- hash = "sha256-ZFVnt7AbMZZdUgiv3AHvH4v+qrwRPNjJ1xyw4NMJFaM=";
- };
+stdenv.mkDerivation rec {
+ pname = "osm-extracts-${region}";
+ version = "211021";
- dontUnpack = true;
+ src = fetchurl {
+ url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf";
+ hash = "sha256-U7vR/EgDXOChoVxGpi1XWw6r3Ey1tdeJtk3vcLRzRGs=";
+ };
+
+ dontUnpack = true;
- nativeBuildInputs = [ gdal osmium-tool ];
+ nativeBuildInputs = [ osmium-tool ];
- buildPhase = lib.concatMapStringsSep "\n"
- (name: ''
- osmium tags-filter -o ${name}-boundary.osm $src r/ISO3166-2=${name}
- osmium extract -p ${name}-boundary.osm $src -s simple -o ${name}.osm
- ogr2ogr -f GeoJSON ${name}-boundary.geojson ${name}-boundary.osm multipolygons
- '')
- regions;
+ buildPhase = ''
+ osmium tags-filter -o ${region}-boundary.osm $src r/ISO3166-2=${region}
+ osmium extract -p ${region}-boundary.osm $src --set-bounds -s simple -o ${region}.osm.pbf
+ osmium export ${region}-boundary.osm -o ${region}-boundary.geojson
+ osmium tags-filter -o ${region}-water.osm ${region}.osm.pbf a/natural=water
+ osmium export ${region}-water.osm -o ${region}-water.geojson
+ '';
- installPhase = "install -Dm644 *.geojson *.osm -t $out";
+ installPhase = ''
+ install -Dm644 *.geojson *.osm *.osm.pbf -t $out
+ '';
- meta = with lib; {
- description = "Administrative boundaries (NWFD)";
- homepage = "https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative";
- license = licenses.free;
- maintainers = [ maintainers.sikmir ];
- platforms = platforms.all;
- skip.ci = true;
- };
+ meta = with lib; {
+ description = "Administrative boundaries (${region})";
+ homepage = "https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative";
+ license = licenses.free;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.all;
+ skip.ci = true;
};
}
diff --git a/pkgs/data/misc/routinodb/default.nix b/pkgs/data/misc/routinodb/default.nix
@@ -2,20 +2,20 @@
stdenv.mkDerivation rec {
pname = "routinodb";
- version = "211014";
+ version = "211021";
srcs = [
(fetchurl {
url = "https://download.geofabrik.de/europe/finland-${version}.osm.pbf";
- hash = "sha256-E2SHTZ21Tq/f+3KffJouQIbo0g2SR+W0gtzhIKkCxuo=";
+ hash = "sha256-57IpvP9ygQoaBMfbEn9cuaX6SonyyjOhaP1HcMmEWOM=";
})
(fetchurl {
url = "https://download.geofabrik.de/europe/estonia-${version}.osm.pbf";
- hash = "sha256-GScnl+2y7f9FfHIotVpfBejAEUF5cU0jEPdYQbGfPzI=";
+ hash = "sha256-usbKCiJotnODkn1jwPNmRgmYqEoAbku2zDTlZ3q/98E=";
})
(fetchurl {
url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf";
- hash = "sha256-MXLlLywPo0JwCgLQOoHRZ2hrw9YEuH+Ey/3zrBvQIIc=";
+ hash = "sha256-U7vR/EgDXOChoVxGpi1XWw6r3Ey1tdeJtk3vcLRzRGs=";
})
];
diff --git a/pkgs/gpx/gpx-animator/default.nix b/pkgs/gpx/gpx-animator/default.nix
@@ -26,7 +26,6 @@ stdenv.mkDerivation rec {
homepage = "https://gpx-animator.app/";
license = licenses.asl20;
maintainers = [ maintainers.sikmir ];
- platforms = platforms.unix;
- skip.ci = true;
+ platforms = jre.meta.platforms;
};
}
diff --git a/pkgs/linguistics/i18n-editor/default.nix b/pkgs/linguistics/i18n-editor/default.nix
@@ -31,7 +31,6 @@ stdenv.mkDerivation rec {
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
- platforms = platforms.unix;
- skip.ci = true;
+ platforms = jre.meta.platforms;
};
}