Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
jre_headless,
|
|
jdk8_headless,
|
|
ant,
|
|
saxon,
|
|
}:
|
|
let
|
|
jdk_headless = jdk8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "jing-trang";
|
|
version = "20181222";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "relaxng";
|
|
repo = "jing-trang";
|
|
rev = "V${version}";
|
|
hash = "sha256-Krupa3MGk5UaaQsaNpPMZuIUzHJytDiksz9ysCPkFS4=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
buildInputs = [
|
|
jdk_headless
|
|
ant
|
|
saxon
|
|
];
|
|
|
|
CLASSPATH = "lib/saxon.jar";
|
|
|
|
patches = [
|
|
./no-git-during-build.patch
|
|
];
|
|
|
|
preBuild = "ant";
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out"/{share/java,bin}
|
|
cp ./build/*.jar ./lib/resolver.jar "$out/share/java/"
|
|
|
|
for tool in jing trang; do
|
|
cat > "$out/bin/$tool" <<EOF
|
|
#! $SHELL
|
|
export JAVA_HOME='${jre_headless}'
|
|
exec '${jre_headless}/bin/java' -jar '$out/share/java/$tool.jar' "\$@"
|
|
EOF
|
|
done
|
|
|
|
chmod +x "$out"/bin/*
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = "ant test";
|
|
|
|
meta = with lib; {
|
|
description = "RELAX NG validator in Java";
|
|
# The homepage is www.thaiopensource.com, but it links to googlecode.com
|
|
# for downloads and call it the "project site".
|
|
homepage = "https://www.thaiopensource.com/relaxng/trang.html";
|
|
platforms = platforms.unix;
|
|
sourceProvenance = with sourceTypes; [
|
|
fromSource
|
|
binaryBytecode # source bundles dependencies as jars
|
|
];
|
|
maintainers = [ maintainers.bjornfor ];
|
|
};
|
|
}
|