9 , stripJavaArchivesHook
13 deps = import ../deps.nix { inherit fetchurl; };
14 testInputs = import ./testinputs.nix { inherit fetchurl; };
16 stdenv.mkDerivation rec {
21 url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk";
23 sha256 = "sha256-y/pl8kIQ6fiF541ho72LMgJFWJdkUBqPToQGCGmmcfg=";
27 # Disable automatic download of dependencies
29 # Fix func.SolverAndProblemGeneratorTest test
30 ./fix-failing-test.patch
33 postPatch = with deps; ''
34 # Manually create version properties file for reproducibility
35 mkdir -p build/classes
36 cat > build/classes/splitter-version.properties << EOF
37 svn.version=${version}
38 build.timestamp=unknown
41 # Put pre-fetched dependencies into the right place
43 cp ${fastutil} lib/compile/${fastutil.name}
44 cp ${osmpbf} lib/compile/${osmpbf.name}
45 cp ${protobuf} lib/compile/${protobuf.name}
46 cp ${xpp3} lib/compile/${xpp3.name}
47 '' + lib.optionalString doCheck ''
49 cp ${junit} lib/test/${junit.name}
50 cp ${hamcrest-core} lib/test/${hamcrest-core.name}
52 mkdir -p test/resources/in/osm
53 ${lib.concatMapStringsSep "\n" (res: ''
54 cp ${res} test/resources/in/${builtins.replaceStrings [ "__" ] [ "/" ] res.name}
58 nativeBuildInputs = [ jdk ant makeWrapper stripJavaArchivesHook ];
78 install -Dm644 dist/splitter.jar -t $out/share/java/splitter
79 install -Dm644 doc/splitter.1 -t $out/share/man/man1
80 cp -r dist/lib/ $out/share/java/splitter/
81 makeWrapper ${jre}/bin/java $out/bin/splitter \
82 --add-flags "-jar $out/share/java/splitter/splitter.jar"
87 passthru.updateScript = [ ../update.sh "mkgmap-splitter" meta.downloadPage ];
90 description = "Utility for splitting OpenStreetMap maps into tiles";
91 downloadPage = "https://www.mkgmap.org.uk/download/splitter.html";
92 homepage = "https://www.mkgmap.org.uk/";
93 license = licenses.gpl2Only;
94 mainProgram = "splitter";
95 maintainers = with maintainers; [ sikmir ];
96 platforms = platforms.all;
97 sourceProvenance = with sourceTypes; [