commit 8aa4aa7fbc2151326821ac7c12ec8bb78b944082
parent 826b637d472ced8cdcbaa5a0bfe2271b10ed056f
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Fri, 14 May 2021 23:09:10 +0300
Up
Diffstat:
10 files changed, 61 insertions(+), 68 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -1,28 +1,4 @@
{
- "geofabrik-estonia": {
- "builtin": false,
- "sha256": "07gy3280arvkvfpm82aqcing1w7av6hq3crf5wxm66ipk2viwmg7",
- "type": "file",
- "url": "https://download.geofabrik.de/europe/estonia-210306.osm.pbf",
- "url_template": "https://download.geofabrik.de/europe/estonia-<version>.osm.pbf",
- "version": "210306"
- },
- "geofabrik-finland": {
- "builtin": false,
- "sha256": "1l9w1f09b1x4b5nayg86h1kqidq8nyg21rp8l8s87b4jycfhw0b0",
- "type": "file",
- "url": "https://download.geofabrik.de/europe/finland-210306.osm.pbf",
- "url_template": "https://download.geofabrik.de/europe/finland-<version>.osm.pbf",
- "version": "210306"
- },
- "geofabrik-russia-nwfd": {
- "builtin": false,
- "sha256": "0dxkamjzb98ncpgqrzw4x71n7cn48pyvrwjws840rxghdj3gfky0",
- "type": "file",
- "url": "https://download.geofabrik.de/russia/northwestern-fed-district-210306.osm.pbf",
- "url_template": "https://download.geofabrik.de/russia/northwestern-fed-district-<version>.osm.pbf",
- "version": "210306"
- },
"gpxlab": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/applications/synwrite/bin.nix b/pkgs/applications/synwrite/bin.nix
@@ -1,12 +1,20 @@
-{ lib, stdenv, fetchurl, unzip, wine, makeWrapper }:
-
+{ lib, stdenv, fetchurl, unzip, wine, makeWrapper, withExLexer ? true }:
+let
+ plugins = fetchurl {
+ url = "http://uvviewsoft.com/synwrite/files/SynWrite_saved_plugins.zip";
+ hash = "sha256-bWc3/fvc++nSVExC1iO1g+DjlXEal5CZQkc4gZB0xU0=";
+ };
+in
stdenv.mkDerivation rec {
pname = "synwrite-bin";
- version = "6.40.2770";
+ version = "6.41.2780";
src = fetchurl {
- url = "mirror://sourceforge/synwrite/Release/SynWrite.${version}.zip";
- sha256 = "0xv6y5n99z6msy16bd1rw3ql0myczjna0yl629msrhhh1yygzbb2";
+ urls = [
+ "mirror://sourceforge/synwrite/Release/SynWrite.${version}.zip"
+ "http://uvviewsoft.com/synwrite/files/SynWrite.${version}.zip"
+ ];
+ hash = "sha256-/WleyQoo98RLX1MJGVjjlPmZJHxiCV4ulrb1eqNHOZ8=";
};
sourceRoot = ".";
@@ -20,6 +28,9 @@ stdenv.mkDerivation rec {
makeWrapper ${wine}/bin/wine $out/bin/synwrite \
--run "[ -d \$HOME/.synwrite ] || { cp -r $out/opt/synwrite \$HOME/.synwrite && chmod -R +w \$HOME/.synwrite; }" \
--add-flags "\$HOME/.synwrite/Syn.exe"
+ '' + lib.optionalString withExLexer ''
+ unzip -j ${plugins} SynWrite_saved_plugins/PyPlugins/plugin.Alexey.ExLexer.zip
+ unzip plugin.Alexey.ExLexer.zip -d $out/opt/synwrite/Py/syn_exlexer
'';
preferLocalBuild = true;
diff --git a/pkgs/data/misc/osm-extracts/default.nix b/pkgs/data/misc/osm-extracts/default.nix
@@ -1,9 +1,5 @@
-{ lib, stdenv, gdal, osmium-tool, sources }:
+{ lib, stdenv, fetchurl, gdal, osmium-tool }:
let
- year = lib.substring 0 2 sources.geofabrik-russia-nwfd.version;
- month = lib.substring 2 2 sources.geofabrik-russia-nwfd.version;
- day = lib.substring 4 2 sources.geofabrik-russia-nwfd.version;
-
regions = [
"RU-ARK"
"RU-VLG"
@@ -19,27 +15,29 @@ let
];
in
{
- admin-boundaries = stdenv.mkDerivation {
+ admin-boundaries = stdenv.mkDerivation rec {
pname = "osm-admin-boundaries";
- version = "20${year}-${month}-${day}";
+ version = "210512";
- src = sources.geofabrik-russia-nwfd;
+ src = fetchurl {
+ url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf";
+ hash = "sha256-VxTUUJeqVKmFDbvf9Wd/DtNYoGuD5ZR6dhenVeDBnAg=";
+ };
dontUnpack = true;
nativeBuildInputs = [ gdal osmium-tool ];
- buildPhase = stdenv.lib.concatMapStringsSep "\n"
- (name: ''
- osmium tags-filter -o ${name}-boundary.osm $src r/ISO3166-2=${name}
- ogr2ogr -f GeoJSON ${name}-boundary.geojson ${name}-boundary.osm multipolygons
- '')
- regions;
+ 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;
- installPhase = "install -Dm644 *.geojson -t $out";
+ installPhase = "install -Dm644 *.geojson *.osm -t $out";
meta = with lib; {
- description = "Administrative boundaries";
+ description = "Administrative boundaries (NWFD)";
homepage = "https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative";
license = licenses.free;
maintainers = [ maintainers.sikmir ];
diff --git a/pkgs/data/misc/routinodb/default.nix b/pkgs/data/misc/routinodb/default.nix
@@ -1,17 +1,22 @@
-{ lib, stdenv, sources, routino }:
-let
- year = lib.substring 0 2 sources.geofabrik-russia-nwfd.version;
- month = lib.substring 2 2 sources.geofabrik-russia-nwfd.version;
- day = lib.substring 4 2 sources.geofabrik-russia-nwfd.version;
-in
-stdenv.mkDerivation {
+{ lib, stdenv, fetchurl, routino }:
+
+stdenv.mkDerivation rec {
pname = "routinodb";
- version = "20${year}-${month}-${day}";
+ version = "210512";
srcs = [
- sources.geofabrik-finland
- sources.geofabrik-estonia
- sources.geofabrik-russia-nwfd
+ (fetchurl {
+ url = "https://download.geofabrik.de/europe/finland-${version}.osm.pbf";
+ hash = "sha256-Vw9rG/SgO6gjgqFEwcO1/PJhtYwkTT/QOeMQTiaDQAw=";
+ })
+ (fetchurl {
+ url = "https://download.geofabrik.de/europe/estonia-${version}.osm.pbf";
+ hash = "sha256-u7WoFIOx5OH+Sv7WuCw7PucS1Ohxz4GzHX2nmR29rMw=";
+ })
+ (fetchurl {
+ url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf";
+ hash = "sha256-VxTUUJeqVKmFDbvf9Wd/DtNYoGuD5ZR6dhenVeDBnAg=";
+ })
];
dontUnpack = true;
@@ -35,7 +40,7 @@ stdenv.mkDerivation {
'';
meta = with lib; {
- description = "Routino Database";
+ description = "Routino Database (FIN+EST+NWFD)";
homepage = "https://download.geofabrik.de/index.html";
license = licenses.free;
maintainers = [ maintainers.sikmir ];
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -108,9 +108,7 @@ lib.makeScope newScope (
### TOOLS
- cmpgpx = callPackage ./tools/geo/cmpgpx {
- inherit geotiler;
- };
+ cmpgpx = callPackage ./tools/geo/cmpgpx { };
datamaps = callPackage ./tools/geo/datamaps { };
elevation = callPackage ./tools/geo/elevation {
click = click-6-7;
diff --git a/pkgs/images/elevation_server/default.nix b/pkgs/images/elevation_server/default.nix
@@ -8,7 +8,7 @@ dockerTools.buildImage {
runAsRoot = "mkdir -p /dem";
config = {
- Cmd = [ "${elevation_server}/bin/elevation_server" "-dem" "/dem/dem_tiles" "-host" "0.0.0.0" ];
+ Cmd = [ "elevation_server" "-dem" "/dem/dem_tiles" "-host" "0.0.0.0" ];
Volumes = {
"/dem" = { };
};
diff --git a/pkgs/images/git/default.nix b/pkgs/images/git/default.nix
@@ -8,7 +8,7 @@ dockerTools.buildImage {
runAsRoot = "mkdir -p /git";
config = {
- Cmd = [ "${git}/bin/git" "daemon" "--base-path=/git" ];
+ Cmd = [ "git" "daemon" "--base-path=/git" ];
Volumes = {
"/git" = { };
};
diff --git a/pkgs/images/mbtileserver/default.nix b/pkgs/images/mbtileserver/default.nix
@@ -8,7 +8,7 @@ dockerTools.buildImage {
runAsRoot = "mkdir -p /tilesets";
config = {
- Cmd = [ "${mbtileserver}/bin/mbtileserver" "--enable-reload" ];
+ Cmd = [ "mbtileserver" "--enable-reload" ];
Volumes = {
"/tilesets" = { };
};
diff --git a/pkgs/images/quark/default.nix b/pkgs/images/quark/default.nix
@@ -8,7 +8,7 @@ dockerTools.buildImage {
runAsRoot = "mkdir -p /htdocs";
config = {
- Cmd = [ "${quark}/bin/quark" "-h" "0.0.0.0" "-p" "8080" "-g" "nobody" "-l" ];
+ Cmd = [ "quark" "-h" "0.0.0.0" "-p" "8080" "-g" "nobody" "-l" ];
WorkingDir = "/htdocs";
Volumes = {
"/htdocs" = { };
diff --git a/pkgs/misc/reproxy/default.nix b/pkgs/misc/reproxy/default.nix
@@ -11,17 +11,22 @@ buildGoModule rec {
hash = "sha256-xZVMwa/44/hGmZxMbHGNInMjsO/5ZXalcHZq5xgO1No=";
};
- vendorSha256 = null;
+ postPatch = ''
+ # Requires network access
+ substituteInPlace app/main_test.go \
+ --replace "Test_Main" "Skip_Main"
+ '';
- doCheck = false;
+ vendorSha256 = null;
- postInstall = "mv $out/bin/{app,reproxy}";
+ postInstall = ''
+ mv $out/bin/{app,reproxy}
+ '';
meta = with lib; {
description = "Simple edge server / reverse proxy";
homepage = "http://reproxy.io/";
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
- platforms = platforms.unix;
};
}