3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/biology/samtools/default.nix

37 lines
973 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";
2017-09-30 18:44:48 +01:00
major = "1.6";
2017-05-07 21:31:14 +01:00
version = "${major}.0";
2016-04-12 20:13:40 +01:00
src = fetchurl {
2017-05-07 21:31:14 +01:00
url = "https://github.com/samtools/samtools/releases/download/${major}/samtools-${major}.tar.bz2";
2017-09-30 18:44:48 +01:00
sha256 = "17p4vdj2j2qr3b2c0v4100h6cg4jj3zrb4dmdnd9d9aqs74d4p7f";
2016-04-12 20:13:40 +01:00
};
2017-05-07 21:31:14 +01:00
buildInputs = [ zlib ncurses ];
2016-06-24 14:14:08 +01:00
2017-09-30 18:44:48 +01:00
propagatedBuildInputs = [ htslib ];
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-09-30 18:44:48 +01:00
enableParallelBuilding = true;
doCheck = true;
preCheck = ''
sed -ie 's|/usr/bin/\(env[[:space:]]\)\{0,1\}perl|${perl}/bin/perl|' test/test.pl
'';
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
};
}