From 056f9e21c08d2573a39d7ba3777bc968cb88ded5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 20 Oct 2023 17:08:20 +0900 Subject: [PATCH] bowtie2: enable tests --- .../science/biology/bowtie2/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/applications/science/biology/bowtie2/default.nix b/pkgs/applications/science/biology/bowtie2/default.nix index 268775fc0b34..356e90555f8d 100644 --- a/pkgs/applications/science/biology/bowtie2/default.nix +++ b/pkgs/applications/science/biology/bowtie2/default.nix @@ -6,6 +6,8 @@ , python3 , tbb , zlib +, runCommand +, bowtie2 }: stdenv.mkDerivation (finalAttrs: { @@ -34,6 +36,20 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = lib.optional (!stdenv.hostPlatform.isx86) ["-DCMAKE_CXX_FLAGS=-I${finalAttrs.src}/third_party"]; + # ctest fails because of missing dependencies between tests + doCheck = false; + + passthru.tests = { + ctest = runCommand "${finalAttrs.pname}-test" { } '' + mkdir $out + ${lib.getExe bowtie2} -x ${finalAttrs.src}/example/index/lambda_virus ${finalAttrs.src}/example/reads/longreads.fq -u 10 + ${bowtie2}/bin/bowtie2-build-s -c GGGCGGCGACCTCGCGGGTTTTCGCTA $out/small + ${bowtie2}/bin/bowtie2-inspect-s $out/small + ${bowtie2}/bin/bowtie2-build-l -c GGGCGGCGACCTCGCGGGTTTTCGCTA $out/large + ${bowtie2}/bin/bowtie2-inspect-l $out/large + ''; + }; + meta = with lib; { description = "An ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences"; license = licenses.gpl3Plus;