1{ lib
2, stdenv
3, fetchurl
4, makeWrapper
5, openjdk17
6, wget
7, which
8, gnused
9, gawk
10, coreutils
11, buildFHSEnv
12}:
13
14let
15 nextflow =
16stdenv.mkDerivation rec {
17 pname = "nextflow";
18 version = "22.10.6";
19
20 src = fetchurl {
21 url = "https://github.com/nextflow-io/nextflow/releases/download/v${version}/nextflow-${version}-all";
22 hash = "sha256-zeYsKxWRnzr0W6CD+yjoAXwCN/AbN5P4HhH1oftnrjY=";
23 };
24
25 nativeBuildInputs = [
26 makeWrapper
27 openjdk17
28 wget
29 which
30 gnused
31 gawk
32 coreutils
33 ];
34
35 dontUnpack = true;
36
37 installPhase = ''
38 runHook preInstall
39
40 mkdir -p $out/bin
41 install -Dm755 $src $out/bin/nextflow
42
43 runHook postInstall
44 '';
45
46 postFixup = ''
47 wrapProgram $out/bin/nextflow \
48 --prefix PATH : ${lib.makeBinPath nativeBuildInputs} \
49 --set JAVA_HOME ${openjdk17.home}
50 '';
51
52 meta = with lib; {
53 description = "DSL for data-driven computational pipelines";
54 longDescription = ''
55 Nextflow is a bioinformatics workflow manager that enables the development of portable and reproducible workflows.
56
57 It supports deploying workflows on a variety of execution platforms including local, HPC schedulers, AWS Batch, Google Cloud Life Sciences, and Kubernetes.
58
59 Additionally, it provides support for manage your workflow dependencies through built-in support for Conda, Docker, Singularity, and Modules.
60 '';
61 homepage = "https://www.nextflow.io/";
62 changelog = "https://github.com/nextflow-io/nextflow/releases";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ Etjean edmundmiller ];
65 mainProgram = "nextflow";
66 platforms = platforms.unix;
67 };
68};
69in
70if stdenv.isLinux then
71 buildFHSEnv
72 {
73 name = "nextflow";
74 targetPkgs = pkgs: [ nextflow ];
75 runScript = "nextflow";
76 }
77else nextflow