Files
nixpkgs/pkgs/by-name/sa/samtools/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

61 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchurl,
zlib,
htslib,
perl,
ncurses ? null,
}:
stdenv.mkDerivation rec {
pname = "samtools";
version = "1.22.1";
src = fetchurl {
url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
hash = "sha256-Aqpc0LpS4GwggAVOBZ19d6iF3+lxfDHNid/npAR+2g4=";
};
# tests require `bgzip` from the htslib package
nativeCheckInputs = [ htslib ];
nativeBuildInputs = [ perl ];
buildInputs = [
zlib
ncurses
htslib
];
preConfigure = lib.optional stdenv.hostPlatform.isStatic ''
export LIBS="-lz -lbz2 -llzma"
'';
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
configureFlags = [
"--with-htslib=${htslib}"
]
++ lib.optional (ncurses == null) "--without-curses"
++ lib.optionals stdenv.hostPlatform.isStatic [ "--without-curses" ];
preCheck = ''
patchShebangs test/
'';
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
description = "Tools for manipulating SAM/BAM/CRAM format";
license = licenses.mit;
homepage = "http://www.htslib.org/";
platforms = platforms.unix;
maintainers = with maintainers; [
mimame
unode
];
};
}