13 stdenv.mkDerivation (finalAttrs: {
17 src = fetchFromGitHub {
18 owner = "BenLangmead";
20 rev = "refs/tags/v${finalAttrs.version}";
21 fetchSubmodules = true;
22 hash = "sha256-ZbmVOItfAgKdsMrvQIXgKiPtoQJZYfGblCGDoNPjvTU=";
25 # because of this flag, gcc on aarch64 cannot find the Threads
26 # Could NOT find Threads (missing: Threads_FOUND)
27 # TODO: check with other distros and report upstream
29 substituteInPlace CMakeLists.txt \
33 nativeBuildInputs = [ cmake ];
35 buildInputs = [ tbb zlib python3 perl ];
37 cmakeFlags = lib.optional (!stdenv.hostPlatform.isx86) ["-DCMAKE_CXX_FLAGS=-I${finalAttrs.src}/third_party"];
39 # ctest fails because of missing dependencies between tests
43 ctest = runCommand "${finalAttrs.pname}-test" { } ''
45 ${lib.getExe bowtie2} -x ${finalAttrs.src}/example/index/lambda_virus ${finalAttrs.src}/example/reads/longreads.fq -u 10
46 ${bowtie2}/bin/bowtie2-build-s -c GGGCGGCGACCTCGCGGGTTTTCGCTA $out/small
47 ${bowtie2}/bin/bowtie2-inspect-s $out/small
48 ${bowtie2}/bin/bowtie2-build-l -c GGGCGGCGACCTCGCGGGTTTTCGCTA $out/large
49 ${bowtie2}/bin/bowtie2-inspect-l $out/large
54 description = "Ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences";
55 license = licenses.gpl3Plus;
56 homepage = "http://bowtie-bio.sf.net/bowtie2";
57 changelog = "https://github.com/BenLangmead/bowtie2/releases/tag/${lib.removePrefix "refs/tags/" finalAttrs.src.rev}";
58 maintainers = with maintainers; [ rybern ];
59 platforms = platforms.all;
60 mainProgram = "bowtie2";