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-04-10 21:04:09 +01:00
|
|
|
version = "1.8";
|
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-04-10 21:04:09 +01:00
|
|
|
sha256 = "05myg7bs90i68qbqab9cdg9rqj2xh39azibrx82ipzc5kcfvqhn9";
|
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
|
|
|
};
|
|
|
|
}
|