Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / interpreters / nextflow / default.nix
blobe4885f985abaa77e8e5062226de242ce4df08107
1 { lib
2 , stdenv
3 , fetchurl
4 , makeWrapper
5 , openjdk17
6 , wget
7 , which
8 , gnused
9 , gawk
10 , coreutils
11 , buildFHSEnv
14 let
15   nextflow =
16 stdenv.mkDerivation rec {
17   pname = "nextflow";
18   version = "22.10.6";
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   };
25   nativeBuildInputs = [
26     makeWrapper
27     openjdk17
28     wget
29     which
30     gnused
31     gawk
32     coreutils
33   ];
35   dontUnpack = true;
37   installPhase = ''
38     runHook preInstall
40     mkdir -p $out/bin
41     install -Dm755 $src $out/bin/nextflow
43     runHook postInstall
44   '';
46   postFixup = ''
47     wrapProgram $out/bin/nextflow \
48       --prefix PATH : ${lib.makeBinPath nativeBuildInputs} \
49       --set JAVA_HOME ${openjdk17.home}
50   '';
52   meta = with lib; {
53     description = "A DSL for data-driven computational pipelines";
54     longDescription = ''
55       Nextflow is a bioinformatics workflow manager that enables the development of portable and reproducible workflows.
57       It supports deploying workflows on a variety of execution platforms including local, HPC schedulers, AWS Batch, Google Cloud Life Sciences, and Kubernetes.
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 = [ maintainers.Etjean ];
65     mainProgram = "nextflow";
66     platforms = platforms.unix;
67   };
70 if stdenv.isLinux then
71   buildFHSEnv
72   {
73     name = "nextflow";
74     targetPkgs = pkgs: [ nextflow ];
75     runScript = "nextflow";
76   }
77 else nextflow