nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
2017-10-01 07:45:19 +00:00

41 lines
980 B
Nix

{ stdenv, fetchurl, htslib, zlib, bzip2, lzma, curl, perl, bash }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "bcftools";
version = "1.6";
src = fetchurl {
url = "https://github.com/samtools/bcftools/releases/download/${version}/${name}.tar.bz2";
sha256 = "10prgmf09a13mk18840938ijqgfc9y92hfc7sa2gcv07ddri0c19";
};
nativeBuildInputs = [ perl ];
buildInputs = [ htslib zlib bzip2 lzma curl ];
makeFlags = [
"HSTDIR=${htslib}"
"prefix=$(out)"
"CC=cc"
];
preCheck = ''
patchShebangs misc/
patchShebangs test/
sed -ie 's|/bin/bash|${bash}/bin/bash|' test/test.pl
'';
enableParallelBuilding = true;
doCheck = true;
meta = with stdenv.lib; {
description = "Tools for manipulating BCF2/VCF/gVCF format, SNP and short indel sequence variants";
license = licenses.mit;
homepage = http://www.htslib.org/;
platforms = platforms.unix;
maintainers = [ maintainers.mimadrid ];
};
}