nixpkgs/pkgs/applications/science/biology/samtools/default.nix

36 lines
880 B
Nix
Raw Normal View History

2017-09-30 18:44:48 +01:00
{ stdenv, fetchurl, zlib, htslib, perl, ncurses ? null }:
2016-04-12 20:13:40 +01:00
stdenv.mkDerivation rec {
2016-06-24 14:14:08 +01:00
name = "${pname}-${version}";
pname = "samtools";
2018-09-21 23:41:24 +01:00
version = "1.9";
2016-04-12 20:13:40 +01:00
src = fetchurl {
2017-10-01 08:30:56 +01:00
url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2";
2018-09-21 23:41:24 +01:00
sha256 = "10ilqbmm7ri8z431sn90lvbjwizd0hhkf9rcqw8j823hf26nhgq8";
2016-04-12 20:13:40 +01:00
};
2017-10-01 08:30:56 +01:00
nativeBuildInputs = [ perl ];
2016-06-24 14:14:08 +01:00
2017-10-01 08:30:56 +01:00
buildInputs = [ zlib ncurses htslib ];
2017-09-30 18:44:48 +01:00
2016-06-24 14:14:08 +01:00
configureFlags = [ "--with-htslib=${htslib}" ]
++ stdenv.lib.optional (ncurses == null) "--without-curses";
2016-04-12 20:13:40 +01:00
2017-10-01 08:30:56 +01:00
preCheck = ''
patchShebangs test/
'';
2017-09-30 18:44:48 +01:00
enableParallelBuilding = true;
doCheck = true;
2016-04-12 20:13:40 +01:00
meta = with stdenv.lib; {
2016-06-24 14:14:08 +01:00
description = "Tools for manipulating SAM/BAM/CRAM format";
2016-04-12 20:13:40 +01:00
license = licenses.mit;
homepage = http://www.htslib.org/;
2016-06-24 14:14:08 +01:00
platforms = platforms.unix;
maintainers = [ maintainers.mimadrid ];
2016-04-12 20:13:40 +01:00
};
}