77 jre ,
88 ant ,
99 makeWrapper ,
10+ mkgmap ,
1011 stripJavaArchivesHook ,
1112 doCheck ? true ,
1213} :
14+
1315let
14- deps = import ../deps.nix { inherit fetchurl ; } ;
16+ inherit ( mkgmap ) deps ;
1517 testInputs = import ./testinputs.nix { inherit fetchurl ; } ;
1618in
17- stdenv . mkDerivation rec {
19+ stdenv . mkDerivation ( finalAttrs : {
1820 pname = "splitter" ;
1921 version = "654" ;
2022
2123 src = fetchsvn {
2224 url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk" ;
23- rev = version ;
24- sha256 = "sha256-y/pl8kIQ6fiF541ho72LMgJFWJdkUBqPToQGCGmmcfg=" ;
25+ rev = finalAttrs . version ;
26+ hash = "sha256-y/pl8kIQ6fiF541ho72LMgJFWJdkUBqPToQGCGmmcfg=" ;
2527 } ;
2628
2729 patches = [
28- # Disable automatic download of dependencies
2930 ./build.xml.patch
30- # Fix func.SolverAndProblemGeneratorTest test
3131 ./fix-failing-test.patch
3232 ] ;
3333
34- postPatch =
35- with deps ;
36- ''
37- # Manually create version properties file for reproducibility
38- mkdir -p build/classes
39- cat > build/classes/splitter-version.properties << EOF
40- svn.version=${ version }
41- build.timestamp=unknown
42- EOF
34+ postPatch = ''
35+ mkdir -p build/classes
36+ cat > build/classes/splitter-version.properties << EOF
37+ svn.version=${ finalAttrs . version }
38+ build.timestamp=unknown
39+ EOF
4340
44- # Put pre-fetched dependencies into the right place
45- mkdir -p lib/compile
46- cp ${ fastutil } lib/compile/${ fastutil . name }
47- cp ${ osmpbf } lib/compile/${ osmpbf . name }
48- cp ${ protobuf } lib/compile/${ protobuf . name }
49- cp ${ xpp3 } lib/compile/${ xpp3 . name }
50- ''
51- + lib . optionalString doCheck ''
52- mkdir -p lib/test
53- cp ${ junit } lib/test/${ junit . name }
54- cp ${ hamcrest-core } lib/test/${ hamcrest-core . name }
41+ mkdir -p lib/compile
42+ cp ${ deps . fastutil } lib/compile/${ deps . fastutil . name }
43+ cp ${ deps . osmpbf } lib/compile/${ deps . osmpbf . name }
44+ cp ${ deps . protobuf } lib/compile/${ deps . protobuf . name }
45+ cp ${ deps . xpp3 } lib/compile/${ deps . xpp3 . name }
46+ ''
47+ + lib . optionalString doCheck ''
48+ mkdir -p lib/test
49+ cp ${ deps . junit } lib/test/${ deps . junit . name }
50+ cp ${ deps . hamcrest-core } lib/test/${ deps . hamcrest-core . name }
5551
56- mkdir -p test/resources/in/osm
57- ${ lib . concatMapStringsSep "\n " ( res : ''
58- cp ${ res } test/resources/in/${ builtins . replaceStrings [ "__" ] [ "/" ] res . name }
59- '' ) testInputs }
60- '' ;
52+ mkdir -p test/resources/in/osm
53+ ${ lib . concatMapStringsSep "\n " ( res : ''
54+ cp ${ res } test/resources/in/${ builtins . replaceStrings [ "__" ] [ "/" ] res . name }
55+ '' ) testInputs }
56+ '' ;
6157
6258 nativeBuildInputs = [
6359 jdk
@@ -94,9 +90,9 @@ stdenv.mkDerivation rec {
9490 '' ;
9591
9692 passthru . updateScript = [
97- .. /update.sh
93+ ./update.sh
9894 "mkgmap-splitter"
99- meta . downloadPage
95+ finalAttrs . meta . downloadPage
10096 ] ;
10197
10298 meta = {
@@ -112,4 +108,4 @@ stdenv.mkDerivation rec {
112108 binaryBytecode # deps
113109 ] ;
114110 } ;
115- }
111+ } )
0 commit comments