mkgmap: 4565 → 4600

This commit is contained in:
Nikolay Korotkiy
2021-01-30 00:05:32 +03:00
parent 2c0b72cae5
commit 4547017e91
4 changed files with 39 additions and 59 deletions
+16 -20
View File
@@ -1,6 +1,6 @@
{ lib, stdenv
, fetchurl
, fetchsvn
, substituteAll
, jdk
, jre
, ant
@@ -9,34 +9,27 @@
, withExamples ? false
}:
let
version = "4565";
sha256 = "0cfh0msky5812l28mavy6p3k2zgyxb698xk79mvla9l45zcicnvw";
deps = import ./deps.nix { inherit fetchurl; };
testInputs = import ./testinputs.nix { inherit fetchurl; };
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "mkgmap";
inherit version;
version = "4600";
src = fetchsvn {
inherit sha256;
url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk";
rev = version;
src = fetchurl {
url = "http://www.mkgmap.org.uk/download/mkgmap-r${version}-src.tar.gz";
sha256 = "1xnqbyrf5cbxmggkk1pjcj5d1767kbp15v12zy2fpbbn3yf0k3sh";
};
patches = [
# Disable automatic download of dependencies
./build.xml.patch
# Fix testJavaRules test
./fix-failing-test.patch
(substituteAll {
# Disable automatic download of dependencies
src = ./build.xml.patch;
inherit version;
})
];
postPatch = with deps; ''
substituteInPlace build.xml \
--subst-var-by version ${version}
mkdir -p lib/compile
cp ${fastutil} lib/compile/${fastutil.name}
cp ${osmpbf} lib/compile/${osmpbf.name}
@@ -65,8 +58,8 @@ stdenv.mkDerivation {
checkPhase = "ant test";
installPhase = ''
install -Dm644 dist/mkgmap.jar $out/share/java/mkgmap/mkgmap.jar
install -Dm644 dist/doc/mkgmap.1 $out/share/man/man1/mkgmap.1
install -Dm644 dist/mkgmap.jar -t $out/share/java/mkgmap
install -Dm644 dist/doc/mkgmap.1 -t $out/share/man/man1
cp -r dist/lib/ $out/share/java/mkgmap/
makeWrapper ${jre}/bin/java $out/bin/mkgmap \
--add-flags "-jar $out/share/java/mkgmap/mkgmap.jar"
@@ -75,9 +68,12 @@ stdenv.mkDerivation {
cp -r dist/examples $out/share/mkgmap/
'';
passthru.updateScript = [ ./update.sh "mkgmap" meta.downloadPage ];
meta = with lib; {
description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data";
homepage = "http://www.mkgmap.org.uk";
downloadPage = "http://www.mkgmap.org.uk/download/mkgmap.html";
license = licenses.gpl2Only;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.all;