git.iko.soy/typeable/nixpkgs
on master help sign in
samtools: refactoring
14feec4mimadrid
pkgs/applications/science/biology/samtools/default.nix+11−5
@@ -1,19 +1,25 @@
1−{ stdenv, fetchurl, zlib, ncurses }:
1+{ stdenv, fetchurl, zlib, htslib, ncurses ? null }:
2
2
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4− name = "samtools-${version}";
4+ name = "${pname}-${version}";
5+ pname = "samtools";
5 version = "1.3.1";
6 version = "1.3.1";
6
7
7 src = fetchurl {
8 src = fetchurl {
8− url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2";
9+ url = "https://github.com/samtools/${pname}/releases/download/${version}/${name}.tar.bz2";
9 sha256 = "0znnnxc467jbf1as2dpskrjhfh8mbll760j6w6rdkwlwbqsp8gbc";
10 sha256 = "0znnnxc467jbf1as2dpskrjhfh8mbll760j6w6rdkwlwbqsp8gbc";
10 };
11 };
11
12
12− buildInputs = [ zlib ncurses ];
13+ buildInputs = [ zlib ncurses htslib ];
14+
15+ configureFlags = [ "--with-htslib=${htslib}" ]
16+ ++ stdenv.lib.optional (ncurses == null) "--without-curses";
13
17
14 meta = with stdenv.lib; {
18 meta = with stdenv.lib; {
15− description = "Tools (written in C using htslib) for manipulating next-generation sequencing data";
19+ description = "Tools for manipulating SAM/BAM/CRAM format";
16 license = licenses.mit;
20 license = licenses.mit;
17 homepage = http://www.htslib.org/;
21 homepage = http://www.htslib.org/;
22+ platforms = platforms.unix;
23+ maintainers = [ maintainers.mimadrid ];
18 };
24 };
19}
25}