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

35 lines
864 B
Nix
Raw Normal View History

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