1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

mkgmap: init at 4289

This commit is contained in:
Nikolay Korotkiy 2019-08-27 14:30:06 +03:00
parent 630e25ba5c
commit 98a283af55
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- a/build.xml 2019-08-26 23:22:55.104829846 +0300
+++ b/build.xml 2019-08-27 00:11:07.366257594 +0300
@@ -227,7 +227,7 @@
</target>
<!-- Compile the product itself (no tests). -->
- <target name="compile" depends="prepare, resolve-compile"
+ <target name="compile" depends="prepare"
description="main compilation">
<javac srcdir="${src}" destdir="${build.classes}" encoding="utf-8" debug="true" includeantruntime="false">

View file

@ -0,0 +1,57 @@
{ stdenv, fetchurl, fetchsvn, jdk, jre, ant, makeWrapper }:
let
fastutil = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/it.unimi.dsi/fastutil/6.5.15-mkg.1b/jars/fastutil.jar";
sha256 = "0d88m0rpi69wgxhnj5zh924q4zsvxq8m4ybk7m9mr3gz1hx0yx8c";
};
osmpbf = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/crosby/osmpbf/1.3.3/jars/osmpbf.jar";
sha256 = "0zb4pqkwly5z30ww66qhhasdhdrzwmrw00347yrbgyk2ii4wjad3";
};
protobuf = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar";
sha256 = "0x6c4pbsizvk3lm6nxcgi1g2iqgrxcna1ip74lbn01f0fm2wdhg0";
};
in
stdenv.mkDerivation rec {
pname = "mkgmap";
version = "4289";
src = fetchsvn {
url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk";
rev = version;
sha256 = "1sm1pw71q7z0jrxm8bcgm6xjl2mcidyibcf0a3m8fv2andidxrb4";
};
# This patch removes from the build process
# the automatic download of dependencies (see configurePhase)
patches = [ ./build.xml.patch ];
nativeBuildInputs = [ jdk ant makeWrapper ];
configurePhase = ''
mkdir -p lib/compile
cp ${fastutil} ${osmpbf} ${protobuf} lib/compile/
'';
buildPhase = "ant";
installPhase = ''
cd dist
install -Dm644 mkgmap.jar $out/share/java/mkgmap/mkgmap.jar
install -Dm644 doc/mkgmap.1 $out/share/man/man1/mkgmap.1
cp -r lib/ $out/share/java/mkgmap/
makeWrapper ${jre}/bin/java $out/bin/mkgmap \
--add-flags "-jar $out/share/java/mkgmap/mkgmap.jar"
'';
meta = with stdenv.lib; {
description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data";
homepage = "http://www.mkgmap.org.uk";
license = licenses.gpl2;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.all;
};
}

View file

@ -5027,6 +5027,8 @@ in
milu = callPackage ../applications/misc/milu { };
mkgmap = callPackage ../applications/misc/mkgmap { };
mpack = callPackage ../tools/networking/mpack { };
mtm = callPackage ../tools/misc/mtm { };