commit 9e12176e4a16d3bdb5ad8b32171a894c2c51b916
parent e924fdc46d96e10a30736db1b0c2520fb21b487d
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Tue, 29 Dec 2020 21:58:08 +0300
slazav-maps: switch to mapsoft2
Diffstat:
6 files changed, 21 insertions(+), 157 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -587,29 +587,29 @@
"map-hr": {
"branch": "master",
"builtin": false,
- "date": "2019-07-14T23:28:27Z",
+ "date": "2020-12-28T23:38:07Z",
"description": "Slazav mountains",
"homepage": "http://slazav.mccme.ru/maps/",
"owner": "slazav",
"repo": "map_hr",
- "rev": "1555f0e49e8b26b5991c6b8ce8ea1f0688b26047",
- "sha256": "1ymyyx4z35vicrr5hz12fcjgdy60vfbjfv2m4m154vw4ay7216wa",
+ "rev": "8137e566160a8d2076a68ec758d3fc80e28b9c6d",
+ "sha256": "15p4wwkndabqpxl4wrfnyza5kbifdfizkigf06dm9d5miqqbnc1k",
"type": "tarball",
- "url": "https://github.com/slazav/map_hr/archive/1555f0e49e8b26b5991c6b8ce8ea1f0688b26047.tar.gz",
+ "url": "https://github.com/slazav/map_hr/archive/8137e566160a8d2076a68ec758d3fc80e28b9c6d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"map-podm": {
"branch": "master",
"builtin": false,
- "date": "2020-08-06T11:51:50Z",
+ "date": "2020-12-28T23:38:24Z",
"description": "Карты Подмосковья в виде номенклатурных листов 1:100000 - исходники в формате mapsoft vmap",
"homepage": "http://slazav.mccme.ru/maps/",
"owner": "slazav",
"repo": "map_podm",
- "rev": "8b7994ba4a4bdc9673e982cf1f528cca1653d060",
- "sha256": "1z7gfsj485aycmk4nzxh8mv3pl18n28i94f5bkmjpr1l4fwg2zjh",
+ "rev": "3081d5f95d5870213b9fa877fabeadd58d01e4b8",
+ "sha256": "0ad2cmx2g5fl8mwqi4wxc1cy1zzzb2riapif11sfxc7gjmj26a6s",
"type": "tarball",
- "url": "https://github.com/slazav/map_podm/archive/8b7994ba4a4bdc9673e982cf1f528cca1653d060.tar.gz",
+ "url": "https://github.com/slazav/map_podm/archive/3081d5f95d5870213b9fa877fabeadd58d01e4b8.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"map-tiler": {
diff --git a/pkgs/data/maps/slazav/0001-fix-hr.patch b/pkgs/data/maps/slazav/0001-fix-hr.patch
@@ -1,62 +0,0 @@
-diff --git i/Makefile w/Makefile
-index d15480e..5c2a0d1 100644
---- i/Makefile
-+++ w/Makefile
-@@ -9,9 +9,9 @@ sync:
-
- img:
- gmt -j -v -m "SLAZAV-1" -o ${IMG_NAME} OUT/*.img /usr/share/mapsoft/slazav.typ
-- mv -f ${IMG_NAME} /home/sla/CH/data/maps/
-- sed -e "/${IMG_NAME}/s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$(date +%F)/"\
-- -i /home/sla/CH/data/maps/index.m4i
-+ #mv -f ${IMG_NAME} /home/sla/CH/data/maps/
-+ #sed -e "/${IMG_NAME}/s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$(date +%F)/"\
-+ # -i /home/sla/CH/data/maps/index.m4i
-
- index: index_fan index_pam index_zab index_saj index_tsh index_kav index_nep index_put\
- index_ura index_sun index_chi
-diff --git i/bin/make_in.sh w/bin/make_in.sh
-index 84ab728..47c25ec 100755
---- i/bin/make_in.sh
-+++ w/bin/make_in.sh
-@@ -59,7 +59,7 @@ for i in $IN_DIR/*.fig $IN_DIR/*.mp; do
- $sources -o "$vmap"
-
- if [ -s "$old" ]; then
-- ~/mapsoft/vector/vmap3/vmap_fix_diff "$old" "$vmap" "$vmap"
-+ vmap_fix_diff "$old" "$vmap" "$vmap"
- fi
-
- rm -f "$old"
-diff --git i/bin/make_out.sh w/bin/make_out.sh
-index 3d8eb2a..7e26b23 100755
---- i/bin/make_out.sh
-+++ w/bin/make_out.sh
-@@ -33,6 +33,7 @@ for i in $VMAP_DIR/*.vmap; do
- if [ "$png" -ot "$i" ]; then
- echo "Updating png: $name"
-
-+ mkdir -p -- "$LAST_PNG_DIR"
- [ -s "$png" ] &&
- convert "$png" -scale 50% "$LAST_PNG_DIR/${name}_o.png" ||:
-
-diff --git i/settings.sh w/settings.sh
-index 369dcef..13a7669 100644
---- i/settings.sh
-+++ w/settings.sh
-@@ -5,11 +5,11 @@ export PATH=./:bin/:$PATH
- export STYLE=hr
-
- export FIG_DIR=fig
--export VMAP_DIR=/home/sla/map_hr/vmap
-+export VMAP_DIR=vmap
-
- export SCALE=100000
-
--export IN_DIR=/home/sla/map_hr/IN
--export OUT_DIR=/home/sla/map_hr/OUT
-+export IN_DIR=IN
-+export OUT_DIR=OUT
-
- export FILTER=mmb
-\ No newline at end of file
diff --git a/pkgs/data/maps/slazav/0001-fix-podm.patch b/pkgs/data/maps/slazav/0001-fix-podm.patch
@@ -1,30 +0,0 @@
-diff --git i/Makefile w/Makefile
-index 71dc2f7..5b91335 100644
---- i/Makefile
-+++ w/Makefile
-@@ -6,9 +6,9 @@ sync:
- ./sync_sv
- img:
- gmt -j -v -m "SLAZAV-1" -o podm.img OUT/?36*.img OUT/?37*.img /usr/share/mapsoft/slazav.typ
-- mv -f podm.img /home/sla/CH/data/maps/
-- sed -e "/podm.img/s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$(date +%F)/"\
-- -i /home/sla/CH/data/maps/index.m4i
-+ #mv -f podm.img /home/sla/CH/data/maps/
-+ #sed -e "/podm.img/s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$(date +%F)/"\
-+ # -i /home/sla/CH/data/maps/index.m4i
-
- #index:
- # . ./settings.sh; map_update_index.sh 600000x400000+7085000+5970000
-diff --git i/bin/make_in.sh w/bin/make_in.sh
-index 731dcc6..ce3f59f 100755
---- i/bin/make_in.sh
-+++ w/bin/make_in.sh
-@@ -54,7 +54,7 @@ for i in $IN_DIR/*.fig $IN_DIR/*.mp; do
- $sources -o "$vmap"
-
- if [ -s "$old" ]; then
-- ~/mapsoft/vector/vmap3/vmap_fix_diff "$old" "$vmap" "$vmap"
-+ vmap_fix_diff "$old" "$vmap" "$vmap"
- fi
-
- rm -f "$old"
diff --git a/pkgs/data/maps/slazav/hr.nix b/pkgs/data/maps/slazav/hr.nix
@@ -1,4 +1,4 @@
-{ stdenv, cgpsmapper, gmaptool, imagemagick, mapsoft, netpbm, zip, sources }:
+{ stdenv, bc, cgpsmapper, gmaptool, mapsoft2, sources }:
stdenv.mkDerivation {
pname = "slazav-hr-unstable";
@@ -6,35 +6,11 @@ stdenv.mkDerivation {
src = sources.map-hr;
- patches = [ ./0001-fix-hr.patch ];
+ nativeBuildInputs = [ bc cgpsmapper gmaptool mapsoft2 ];
- nativeBuildInputs = [
- cgpsmapper
- gmaptool
- imagemagick
- mapsoft
- netpbm
- zip
- ];
+ buildFlags = [ "directories" "reg_img" ];
- postPatch = ''
- substituteInPlace Makefile \
- --replace "/usr/share/mapsoft" "${mapsoft}/share/mapsoft"
- substituteInPlace bin/map_update_index.sh \
- --replace "/usr/share/mapsoft" "${mapsoft}/share/mapsoft"
-
- patchShebangs ./bin
- '';
-
- dontConfigure = true;
-
- preBuild = "mkdir -p OUT";
-
- buildFlags = [ "out" "img" ];
-
- installPhase = ''
- install -Dm644 hr.img -t $out
- '';
+ installPhase = "install -Dm644 OUT/all_*.img -t $out";
meta = with stdenv.lib; {
inherit (sources.map-hr) description homepage;
diff --git a/pkgs/data/maps/slazav/podm-bin.nix b/pkgs/data/maps/slazav/podm-bin.nix
@@ -1,16 +1,16 @@
{ stdenv, fetchurl }:
fetchurl {
- name = "slazav-podm-2020-08-05";
- url = "http://slazav.mccme.ru/maps/podm/podm.img";
- sha256 = "0cny4hjmkx27fbpb3bbbbha7mb81xm0wp94kdilils735pmdwfk9";
+ name = "slazav-podm-2020-12-03";
+ url = "http://slazav.xyz/maps/podm/all_podm.img";
+ sha256 = "0ils8dm81dmc937fqbdc0a5d8hwj6fx6ja8aci1vjg295fc77nk0";
downloadToTemp = true;
recursiveHash = true;
- postFetch = "install -Dm644 $downloadedFile $out/podm.img";
+ postFetch = "install -Dm644 $downloadedFile $out/all_podm.img";
meta = with stdenv.lib; {
- homepage = "http://slazav.mccme.ru/maps/podm/index.htm";
+ homepage = "http://slazav.xyz/maps/podm_txt.htm";
description = "Карты Подмосковья";
license = licenses.free;
maintainers = [ maintainers.sikmir ];
diff --git a/pkgs/data/maps/slazav/podm.nix b/pkgs/data/maps/slazav/podm.nix
@@ -1,4 +1,4 @@
-{ stdenv, cgpsmapper, gmaptool, imagemagick, mapsoft, netpbm, zip, sources }:
+{ stdenv, bc, cgpsmapper, gmaptool, mapsoft2, sources }:
stdenv.mkDerivation {
pname = "slazav-podm-unstable";
@@ -6,31 +6,11 @@ stdenv.mkDerivation {
src = sources.map-podm;
- patches = [ ./0001-fix-podm.patch ];
+ nativeBuildInputs = [ bc cgpsmapper gmaptool mapsoft2 ];
- nativeBuildInputs = [
- cgpsmapper
- gmaptool
- imagemagick
- mapsoft
- netpbm
- zip
- ];
+ buildFlags = [ "directories" "reg_img" ];
- postPatch = ''
- substituteInPlace Makefile \
- --replace "/usr/share/mapsoft" "${mapsoft}/share/mapsoft"
-
- patchShebangs ./bin
- '';
-
- dontConfigure = true;
-
- preBuild = "mkdir -p OUT";
-
- buildFlags = [ "out" "img" ];
-
- installPhase = "install -Dm644 podm.img -t $out";
+ installPhase = "install -Dm644 OUT/all_*.img -t $out";
meta = with stdenv.lib; {
inherit (sources.map-podm) description homepage;