rtg-tools: fix path for hap.py and add tests.

Hap.py can call vfceval for rtg-tools but some executables cannot
be found.
This commit is contained in:
Alexis Praga 2025-05-11 23:54:30 +02:00 committed by Gaetan Lepage
parent bf43db0cc5
commit 023b50d066

View file

@ -5,6 +5,9 @@
jdk,
ant,
git,
coreutils,
hostname,
gawk,
unzip,
}:
@ -44,11 +47,19 @@ stdenv.mkDerivation rec {
# Use a location outside nix (must be writable)
substituteInPlace installer/rtg \
--replace-fail '$THIS_DIR/rtg.cfg' '$HOME/.config/rtg-tools/rtg.cfg' \
--replace-fail 'RTG_JAVA="java"' 'RTG_JAVA="${jdk}/lib/openjdk/bin/java"'
--replace-fail 'RTG_JAVA="java"' 'RTG_JAVA="${jdk}/lib/opendk/bin/java"' \
--replace-fail uname ${lib.getExe' coreutils "uname"} \
--replace-fail awk ${lib.getExe gawk} \
--replace-fail "hostname -s" "${lib.getExe hostname} -s"
sed -i '/USER_JAVA_OPTS=$RTG_JAVA_OPTS/a mkdir -p $HOME/.config/rtg-tools' installer/rtg
'';
checkPhase = ''
ant runalltests
'';
meta = with lib; {
homepage = "https://github.com/RealTimeGenomics/rtg-tools";
description = "Useful utilities for dealing with VCF files and sequence data, especially vcfeval";