nixpkgs-suyu/pkgs/applications/science/biology/samtools/default.nix
2021-10-12 10:19:36 +11:00

34 lines
863 B
Nix

{ lib, stdenv, fetchurl, zlib, htslib, perl, ncurses ? null }:
stdenv.mkDerivation rec {
pname = "samtools";
version = "1.13";
src = fetchurl {
url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-YWyi4FHMgAmh6cAc/Yx8r4twkW3f9m87dpFAeUZfjGA=";
};
nativeBuildInputs = [ perl ];
buildInputs = [ zlib ncurses htslib ];
configureFlags = [ "--with-htslib=${htslib}" ]
++ lib.optional (ncurses == null) "--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 ];
};
}