about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRolf Schröder <58295931+rollf@users.noreply.github.com>2024-05-03 16:45:50 +0200
committerGitHub <noreply@github.com>2024-05-03 14:45:50 +0000
commit8ee9e2c2962f4fab0a862c875a807e86cfae9da8 (patch)
treeab06cf759c2db779ac98304fd95c13e9e158945a
parentfc33a5b75314683f7132bb17bf92629b874406d8 (diff)
nf-test: init at 0.8.4 (#308756)
-rw-r--r--pkgs/by-name/nf/nf-test/package.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/by-name/nf/nf-test/package.nix b/pkgs/by-name/nf/nf-test/package.nix
new file mode 100644
index 000000000000..44a6c5d8f4a9
--- /dev/null
+++ b/pkgs/by-name/nf/nf-test/package.nix
@@ -0,0 +1,58 @@
+{ lib
+, fetchurl
+, makeWrapper
+, nextflow
+, nf-test
+, openjdk11
+, stdenv
+, testers
+}:
+stdenv.mkDerivation rec {
+
+  pname = "nf-test";
+  version = "0.8.4";
+
+  src = fetchurl {
+    url = "https://github.com/askimed/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-gCO75uNUKU+6UUST9CP4DnWGnl2vflH0y4CId/3IQ4E=";
+  };
+  sourceRoot = ".";
+
+  buildInputs = [
+    makeWrapper
+  ];
+
+  nativeBuildInputs = [
+    nextflow
+  ];
+
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/nf-test
+    install -Dm644 nf-test.jar $out/share/nf-test
+
+    mkdir -p $out/bin
+    makeWrapper ${openjdk11}/bin/java $out/bin/nf-test \
+      --add-flags "-jar $out/share/nf-test/nf-test.jar" \
+      --prefix PATH : ${lib.makeBinPath nativeBuildInputs} \
+
+    runHook postInstall
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = nf-test;
+    command = "nf-test version";
+  };
+
+  meta = with lib; {
+    description = "Simple test framework for Nextflow pipelines";
+    homepage = "https://www.nf-test.com/";
+    changelog = "https://github.com/askimed/nf-test/releases";
+    license = licenses.mit;
+    maintainers = with maintainers; [ rollf ];
+    mainProgram = "nf-test";
+    platforms = platforms.unix;
+  };
+}