From 2ce78bd571a7985f40024af2d4ac2aa407c3e383 Mon Sep 17 00:00:00 2001 From: Alexis Praga Date: Fri, 16 Sep 2022 21:43:51 +0200 Subject: [PATCH] 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. --- pkgs/applications/science/biology/gatk/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/biology/gatk/default.nix b/pkgs/applications/science/biology/gatk/default.nix index c0818b8336df..9853b0322c01 100644 --- a/pkgs/applications/science/biology/gatk/default.nix +++ b/pkgs/applications/science/biology/gatk/default.nix @@ -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; {