nixpkgs/pkgs/applications/science/biology/samtools/default.nix
2017-10-01 07:36:30 +00:00

35 lines
880 B
Nix

{ stdenv, fetchurl, zlib, htslib, perl, ncurses ? null }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "samtools";
version = "1.6";
src = fetchurl {
url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2";
sha256 = "17p4vdj2j2qr3b2c0v4100h6cg4jj3zrb4dmdnd9d9aqs74d4p7f";
};
nativeBuildInputs = [ perl ];
buildInputs = [ zlib ncurses htslib ];
configureFlags = [ "--with-htslib=${htslib}" ]
++ stdenv.lib.optional (ncurses == null) "--without-curses";
preCheck = ''
patchShebangs test/
'';
enableParallelBuilding = true;
doCheck = true;
meta = with stdenv.lib; {
description = "Tools for manipulating SAM/BAM/CRAM format";
license = licenses.mit;
homepage = http://www.htslib.org/;
platforms = platforms.unix;
maintainers = [ maintainers.mimadrid ];
};
}