gatk: add java and python to PATH

gatk is actually a python script that starts either the local or spark
.jar file according to a fixed setup.
In the initial commit, neither java nor python were present in PATH.
This commit is contained in:
Alexis Praga 2022-09-16 21:43:51 +02:00 committed by Alexis Praga
parent f77a8a1df0
commit 2ce78bd571

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchzip }:
{ lib, stdenv, fetchzip, jre, makeWrapper, python3 }:
stdenv.mkDerivation rec {
pname = "gatk";
@ -8,10 +8,19 @@ stdenv.mkDerivation rec {
sha256 = "0hjlsl7fxf3ankyjidqhwxc70gjh6z4lnjzw6b5fldzb0qvgfvy8";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
install -m755 -D $src/gatk $out/bin/
install -m755 -D $src/gatk-package-${version}-local.jar $out/bin/
install -m755 -D $src/gatk-package-${version}-spark.jar $out/bin/
install -m755 -D $src/gatk $out/bin/
'';
postFixup = ''
wrapProgram $out/bin/gatk --prefix PATH : ${lib.makeBinPath [ jre ]}
'';
meta = with lib; {