diff --git a/default.nix b/default.nix
index 0cd8fa0c990ad254e912942f842a72eba919fa24..4032c06b9d096e7f9f3e7920e8dcfea299c6ef17 100644
--- a/default.nix
+++ b/default.nix
@@ -89,6 +89,10 @@ };
mercantile = python3Packages.callPackage ./pkgs/mercantile {
inherit (sources) mercantile;
};
openorienteering-mapper = libsForQt5.callPackage ./pkgs/openorienteering-mapper {
inherit (sources) mapper;
};
diff --git a/nix/sources.json b/nix/sources.json
index 151ad5b5404323003b6769cdb892bee4074e7af8..a696237043140a5b42d67b9793bec39728214e29 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -275,6 +275,18 @@ "type": "tarball",
"url": "https://github.com/mapbox/mercantile/archive/dae32795f9da7a9f39d8ea52f2321af008f35ab9.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"branch": "master",
"description": "Linux script to extract and compile garmin *.img map files from openmtbmap.org or openvelomap.org downloads",
"homepage": "https://github.com/btittelbach/openmtbmap_openvelomap_linux",
"owner": "btittelbach",
"repo": "openmtbmap_openvelomap_linux",
"rev": "6d00e273d7391fae72fb7fd21859483db3e26c1a",
"sha256": "17az6k4z71k85ibcabka6yig6bnpk6fknmgx9ilk1x74rifaz06s",
"type": "tarball",
"url": "https://github.com/btittelbach/openmtbmap_openvelomap_linux/archive/6d00e273d7391fae72fb7fd21859483db3e26c1a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
"pymbtiles": {
"branch": "master",
"description": "Python utilities for Mapbox mbtiles files",
diff --git a/pkgs/openmtbmap_openvelomap_linux/0001-fix-path.patch b/pkgs/openmtbmap_openvelomap_linux/0001-fix-path.patch
new file mode 100644
index 0000000000000000000000000000000000000000..b081a5dc5565af5b1e32ee72dda31a558698cd7a
--- /dev/null
+++ b/pkgs/openmtbmap_openvelomap_linux/0001-fix-path.patch
@@ -0,0 +1,61 @@
+diff --git i/create_omtb_garmin_img.sh w/create_omtb_garmin_img.sh
+index 03a0ae6..143260d 100755
+--- i/create_omtb_garmin_img.sh
++++ w/create_omtb_garmin_img.sh
+@@ -90,20 +90,20 @@ elif [[ -n ${OMTB_EXE:t} ]]; then
usage
+-GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) ${^path}/gmt(.N,@-.) )
++GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) %gmaptool%/bin/gmt(.N,@-.) )
+-MKGMAP=( ${ARGS_A[-m]}(.N,@-.) /usr/share/mkgmap/mkgmap.jar(.N,@-.) /usr/local/share/mkgmap/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap/mkgmap.jar(.N,@-.) ${^path}/mkgmap.jar(.N,@-.) )
++MKGMAP=( ${ARGS_A[-m]}(.N,@-.) %mkgmap%/bin/mkgmap(.N,@-.) )
+-if ! [[ -x =7z ]]; then
+- print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr
+- exit 3
+-fi
++#if ! [[ -x =7z ]]; then
++# print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr
++# exit 3
++#fi
+@@ -116,7 +116,7 @@ else
[[ -n $ARGS_A[-o] ]] && {print "\nWarning: -o given but ${ARGS_A[-o]} is not a directory.\n Using ${OMTB_EXE:A:h} instead..\n"}
+-if ! [[ ( -n $MKGMAP && -x =java ) || -x $WINE_EXE ]]; then
++if ! [[ ( -n $MKGMAP ) || -x $WINE_EXE ]]; then
print "\nERROR: either mkgmap (+java) or wine are required!" > /dev/stderr
exit 4
+@@ -151,7 +151,7 @@ fi
print "Extracting $OMTB_EXE ..."
+- 7z e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1
++ %7z% e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1
#Check if extraction files are there
FIMG_a=(${TMPDIR}/6<->.img(N[1]))
[[ -z $FIMG_a ]] && {print "\nERROR: Could not find 6*.img file after extracting $OMTB_EXE" >/dev/stderr ; exit 1}
+@@ -192,9 +192,9 @@ if [[ -n $MKGMAP ]]; then
print "Using mkgmap, building address search index..."
#java -Xmx1000M -jar mkgmap.jar --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp 6*.img 7*.img 01002468.TYP
if [[ $(grep MemTotal: /proc/meminfo | awk '{print $2}') -gt $((1024*1024*3)) ]]; then
+- java -Xmx3000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7
++ $MKGMAP -Xmx3000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7
else
+- java -Xmx1000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7
++ $MKGMAP -Xmx1000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7
fi
mv (#i)gmapsupp.img "${DSTFILENAME}" || exit 7
diff --git a/pkgs/openmtbmap_openvelomap_linux/default.nix b/pkgs/openmtbmap_openvelomap_linux/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..988a41187d25f80dbb2c2030e8fc4cf4c58f9b0d
--- /dev/null
+++ b/pkgs/openmtbmap_openvelomap_linux/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, gmaptool, mkgmap, p7zip, zsh, openmtbmap_openvelomap_linux }:
+stdenv.mkDerivation rec {
--replace "%gmaptool%" "${gmaptool}" \
--replace "%mkgmap%" "${mkgmap}" \
--replace "%7z%" "${p7zip}/bin/7z"
+}
application/octet-stream
This content has been proxied by September (3851b).