diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix index 9535609fa78..e97af1ea0ee 100644 --- a/pkgs/applications/science/biology/samtools/default.nix +++ b/pkgs/applications/science/biology/samtools/default.nix @@ -1,19 +1,25 @@ -{ stdenv, fetchurl, zlib, ncurses }: +{ stdenv, fetchurl, zlib, htslib, ncurses ? null }: stdenv.mkDerivation rec { - name = "samtools-${version}"; + name = "${pname}-${version}"; + pname = "samtools"; version = "1.3.1"; src = fetchurl { - url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2"; + url = "https://github.com/samtools/${pname}/releases/download/${version}/${name}.tar.bz2"; sha256 = "0znnnxc467jbf1as2dpskrjhfh8mbll760j6w6rdkwlwbqsp8gbc"; }; - buildInputs = [ zlib ncurses ]; + buildInputs = [ zlib ncurses htslib ]; + + configureFlags = [ "--with-htslib=${htslib}" ] + ++ stdenv.lib.optional (ncurses == null) "--without-curses"; meta = with stdenv.lib; { - description = "Tools (written in C using htslib) for manipulating next-generation sequencing data"; + description = "Tools for manipulating SAM/BAM/CRAM format"; license = licenses.mit; homepage = http://www.htslib.org/; + platforms = platforms.unix; + maintainers = [ maintainers.mimadrid ]; }; }