nextflow: 22.04.5 -> 22.10.6

This commit is contained in:
Weijia Wang 2023-02-02 03:00:33 +01:00
parent 34f5d8cd24
commit 97b3ca8685

View file

@ -2,25 +2,35 @@
, stdenv , stdenv
, fetchurl , fetchurl
, makeWrapper , makeWrapper
, jre , openjdk17
, wget , wget
, which , which
, gnused , gnused
, gawk , gawk
, coreutils , coreutils
, buildFHSUserEnv
}: }:
let
nextflow =
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "nextflow"; pname = "nextflow";
version = "22.04.5"; version = "22.10.6";
src = fetchurl { src = fetchurl {
url = "https://github.com/nextflow-io/nextflow/releases/download/v${version}/nextflow-${version}-all"; url = "https://github.com/nextflow-io/nextflow/releases/download/v${version}/nextflow-${version}-all";
sha256 = "sha256-Lpxb0lGR/oiPzj6j+lySZwiRgkRgPgyjK7FX0BSejm4="; hash = "sha256-zeYsKxWRnzr0W6CD+yjoAXwCN/AbN5P4HhH1oftnrjY=";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [
buildInputs = [ jre wget which gnused gawk coreutils ]; makeWrapper
openjdk17
wget
which
gnused
gawk
coreutils
];
dontUnpack = true; dontUnpack = true;
@ -34,7 +44,9 @@ stdenv.mkDerivation rec {
''; '';
postFixup = '' postFixup = ''
wrapProgram $out/bin/nextflow --prefix PATH : ${lib.makeBinPath buildInputs} wrapProgram $out/bin/nextflow \
--prefix PATH : ${lib.makeBinPath nativeBuildInputs} \
--set JAVA_HOME ${openjdk17.home}
''; '';
meta = with lib; { meta = with lib; {
@ -53,4 +65,13 @@ stdenv.mkDerivation rec {
mainProgram = "nextflow"; mainProgram = "nextflow";
platforms = platforms.unix; platforms = platforms.unix;
}; };
} };
in
if stdenv.isLinux then
buildFHSUserEnv
{
name = "nextflow";
targetPkgs = pkgs: [ nextflow ];
runScript = "nextflow";
}
else nextflow