Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions pkgs/applications/misc/mkgmap/testinputs.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/build.xml (revision 597)
+++ a/build.xml (working copy)
--- a/build.xml 2026-02-10 03:53:33.129313250 +0200
+++ b/build.xml 2026-02-10 03:53:36.908100965 +0200
@@ -212,7 +212,7 @@
</propertyfile>
</target>
Expand All @@ -9,7 +9,7 @@
<javac srcdir="${src}" destdir="${build.classes}" debug="yes" includeantruntime="false">
<include name="**/*.java"/>
<classpath refid="classpath"/>
@@ -219,7 +219,7 @@
@@ -222,7 +222,7 @@
</javac>
</target>

Expand All @@ -18,7 +18,7 @@
<javac srcdir="${test}" destdir="${build.test-classes}" debug="yes" includeantruntime="false">
<include name="**/*.java"/>
<classpath refid="test.classpath"/>
@@ -324,7 +324,7 @@
@@ -330,7 +330,7 @@
</target>

<!-- Main -->
Expand All @@ -27,7 +27,7 @@
<copy todir="${build.classes}">
<fileset dir="${resources}">
<include name="*.properties"/>
@@ -349,7 +349,7 @@
@@ -355,7 +355,7 @@
ignoreerrors="true"/>
</target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@
jre,
ant,
makeWrapper,
mkgmap,
stripJavaArchivesHook,
doCheck ? true,
}:

let
deps = import ../deps.nix { inherit fetchurl; };
inherit (mkgmap) deps;
testInputs = import ./testinputs.nix { inherit fetchurl; };
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "splitter";
version = "654";

src = fetchsvn {
url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk";
rev = version;
sha256 = "sha256-y/pl8kIQ6fiF541ho72LMgJFWJdkUBqPToQGCGmmcfg=";
rev = finalAttrs.version;
hash = "sha256-y/pl8kIQ6fiF541ho72LMgJFWJdkUBqPToQGCGmmcfg=";
};

patches = [
Expand All @@ -31,33 +33,31 @@ stdenv.mkDerivation rec {
./fix-failing-test.patch
];

postPatch =
with deps;
''
# Manually create version properties file for reproducibility
mkdir -p build/classes
cat > build/classes/splitter-version.properties << EOF
svn.version=${version}
build.timestamp=unknown
EOF
postPatch = ''
# Manually create version properties file for reproducibility
mkdir -p build/classes
cat > build/classes/splitter-version.properties << EOF
svn.version=${finalAttrs.version}
build.timestamp=unknown
EOF

# Put pre-fetched dependencies into the right place
mkdir -p lib/compile
cp ${fastutil} lib/compile/${fastutil.name}
cp ${osmpbf} lib/compile/${osmpbf.name}
cp ${protobuf} lib/compile/${protobuf.name}
cp ${xpp3} lib/compile/${xpp3.name}
''
+ lib.optionalString doCheck ''
mkdir -p lib/test
cp ${junit} lib/test/${junit.name}
cp ${hamcrest-core} lib/test/${hamcrest-core.name}
# Put pre-fetched dependencies into the right place
mkdir -p lib/compile
cp ${deps.fastutil} lib/compile/${deps.fastutil.name}
cp ${deps.osmpbf} lib/compile/${deps.osmpbf.name}
cp ${deps.protobuf} lib/compile/${deps.protobuf.name}
cp ${deps.xpp3} lib/compile/${deps.xpp3.name}
''
+ lib.optionalString doCheck ''
mkdir -p lib/test
cp ${deps.junit} lib/test/${deps.junit.name}
cp ${deps.hamcrest-core} lib/test/${deps.hamcrest-core.name}

mkdir -p test/resources/in/osm
${lib.concatMapStringsSep "\n" (res: ''
cp ${res} test/resources/in/${builtins.replaceStrings [ "__" ] [ "/" ] res.name}
'') testInputs}
'';
mkdir -p test/resources/in/osm
${lib.concatMapStringsSep "\n" (res: ''
cp ${res} test/resources/in/${builtins.replaceStrings [ "__" ] [ "/" ] res.name}
'') testInputs}
'';

nativeBuildInputs = [
jdk
Expand Down Expand Up @@ -94,9 +94,9 @@ stdenv.mkDerivation rec {
'';

passthru.updateScript = [
../update.sh
./update.sh
"mkgmap-splitter"
meta.downloadPage
finalAttrs.meta.downloadPage
];

meta = {
Expand All @@ -112,4 +112,4 @@ stdenv.mkDerivation rec {
binaryBytecode # deps
];
};
}
})
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{ fetchurl }:
let
fetchTestInput =
{ res, sha256 }:
{ res, hash }:
fetchurl {
inherit sha256;
inherit hash;
url = "https://www.mkgmap.org.uk/testinput/${res}";
name = builtins.replaceStrings [ "/" ] [ "__" ] res;
};
in
[
(fetchTestInput {
res = "osm/alaska-2016-12-27.osm.pbf";
sha256 = "0hmb5v71a1bxgvrg1cbfj5l27b3vvdazs4pyggpmhcdhbwpw7ppm";
hash = "sha256-9d7DL1+wMVjve/4S/VXbe6wjaJFusfDyfn0FFc4uq0I=";
})
(fetchTestInput {
res = "osm/hamburg-2016-12-26.osm.pbf";
sha256 = "08bny4aavwm3z2114q99fv3fi2w905zxi0fl7bqgjyhgk0fxjssf";
hash = "sha256-TmvZHZgPevnwOtSB2H8BiYvoxnYpYRKC+KPyrRTxdiE=";
})
]
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
--- a/build.xml (revision 4555)
+++ a/build.xml (working copy)
@@ -228,7 +228,7 @@
--- a/build.xml
+++ b/build.xml
@@ -228,8 +228,7 @@
</target>

<!-- Compile the product itself (no tests). -->
- <target name="compile" depends="prepare, resolve-compile"
+ <target name="compile" depends="prepare"
description="main compilation">
- description="main compilation">
+ <target name="compile" depends="prepare" description="main compilation">

<javac srcdir="${src}" destdir="${build.classes}" encoding="utf-8" debug="true" includeantruntime="false">
@@ -263,7 +263,7 @@
<include name="**/*.java" />
@@ -264,7 +263,7 @@
</target>

<!-- Compile the test classes -->
- <target name="build-test" depends="build, resolve-test">
+ <target name="build-test" depends="build">
<mkdir dir="${build.test}" />
<javac srcdir="${test}" destdir="${build.test}" encoding="utf-8" debug="true" includeantruntime="false">
<include name="**/*.java" />
@@ -271,7 +271,7 @@
@@ -275,7 +274,7 @@
</javac>
</target>

- <target name="test" depends="build-test, obtain-test-input-files" description="Run the junit tests">
+ <target name="test" depends="build-test" description="Run the junit tests">
<mkdir dir="tmp/report"/>
<junit printsummary="yes" failureproperty="junit.failure" forkmode="once">

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading