1 { lib, stdenv, fetchFromGitHub, jre_headless, jdk_headless, ant, saxon }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-Krupa3MGk5UaaQsaNpPMZuIUzHJytDiksz9ysCPkFS4=";
12 fetchSubmodules = true;
15 buildInputs = [ jdk_headless ant saxon ];
17 CLASSPATH = "lib/saxon.jar";
20 ./no-git-during-build.patch
26 mkdir -p "$out"/{share/java,bin}
27 cp ./build/*.jar ./lib/resolver.jar "$out/share/java/"
29 for tool in jing trang; do
30 cat > "$out/bin/$tool" <<EOF
32 export JAVA_HOME='${jre_headless}'
33 exec '${jre_headless}/bin/java' -jar '$out/share/java/$tool.jar' "\$@"
41 checkPhase = "ant test";
44 description = "RELAX NG validator in Java";
45 # The homepage is www.thaiopensource.com, but it links to googlecode.com
46 # for downloads and call it the "project site".
47 homepage = "https://www.thaiopensource.com/relaxng/trang.html";
48 platforms = platforms.unix;
49 sourceProvenance = with sourceTypes; [
51 binaryBytecode # source bundles dependencies as jars
53 maintainers = [ maintainers.bjornfor ];