Files
nixpkgs/pkgs/by-name/bo/bowtie2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
perl,
python3,
onetbb,
zlib,
runCommand,
bowtie2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bowtie2";
version = "2.5.4";
src = fetchFromGitHub {
owner = "BenLangmead";
repo = "bowtie2";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-ZbmVOItfAgKdsMrvQIXgKiPtoQJZYfGblCGDoNPjvTU=";
};
# because of this flag, gcc on aarch64 cannot find the Threads
# Could NOT find Threads (missing: Threads_FOUND)
# TODO: check with other distros and report upstream
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "-m64" ""
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
onetbb
zlib
python3
perl
];
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 = "Ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences";
license = licenses.gpl3Plus;
homepage = "http://bowtie-bio.sf.net/bowtie2";
changelog = "https://github.com/BenLangmead/bowtie2/releases/tag/v${finalAttrs.version}";
maintainers = with maintainers; [ rybern ];
platforms = platforms.all;
mainProgram = "bowtie2";
};
})