From d3da5cbf449948e5b058cac5b19510c7c0955a55 Mon Sep 17 00:00:00 2001 From: mimadrid Date: Fri, 24 Jun 2016 15:08:16 +0200 Subject: [PATCH 1/3] htslib: init at 1.3.1 --- .../science/biology/htslib/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/libraries/science/biology/htslib/default.nix diff --git a/pkgs/development/libraries/science/biology/htslib/default.nix b/pkgs/development/libraries/science/biology/htslib/default.nix new file mode 100644 index 00000000000..2609861e319 --- /dev/null +++ b/pkgs/development/libraries/science/biology/htslib/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, zlib }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "htslib"; + version = "1.3.1"; + + src = fetchurl { + url = "https://github.com/samtools/${pname}/releases/download/${version}/${name}.tar.bz2"; + sha256 = "49d53a2395b8cef7d1d11270a09de888df8ba06f70fe68282e8235ee04124ae6"; + }; + + buildInputs = [ zlib ]; + + meta = with stdenv.lib; { + description = "A C library for reading/writing high-throughput sequencing data"; + license = licenses.mit; + homepage = http://www.htslib.org/; + platforms = platforms.unix; + maintainers = [ maintainers.mimadrid ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65fced534a8..79718fc79e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15885,6 +15885,8 @@ in emboss = callPackage ../applications/science/biology/emboss { }; + htslib = callPackage ../development/libraries/science/biology/htslib { }; + neuron = callPackage ../applications/science/biology/neuron { }; neuron-mpi = appendToName "mpi" (neuron.override { From 14feec44e4a31b4df7ce166e7d7dfef3c7f81e29 Mon Sep 17 00:00:00 2001 From: mimadrid Date: Fri, 24 Jun 2016 15:14:08 +0200 Subject: [PATCH 2/3] samtools: refactoring --- .../science/biology/samtools/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 ]; }; } From d91d245f1607a44532e4237a997e9bf64ebca120 Mon Sep 17 00:00:00 2001 From: mimadrid Date: Fri, 24 Jun 2016 15:18:08 +0200 Subject: [PATCH 3/3] bcftools: init at 1.3.1 --- .../science/biology/bcftools/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/applications/science/biology/bcftools/default.nix diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix new file mode 100644 index 00000000000..d4e4ed5b954 --- /dev/null +++ b/pkgs/applications/science/biology/bcftools/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, zlib, htslib }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "bcftools"; + version = "1.3.1"; + + src = fetchurl { + url = "https://github.com/samtools/${pname}/releases/download/${version}/${name}.tar.bz2"; + sha256 = "095ry68vmz9q5s1scjsa698dhgyvgw5aicz24c19iwfbai07mhqj"; + }; + + buildInputs = [ zlib ]; + + preBuild = '' + makeFlagsArray=("HSTDIR=${htslib}" "prefix=$out") + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79718fc79e5..11c0641558b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15883,6 +15883,8 @@ in stdenv = overrideCC stdenv gcc49; }; + bcftools = callPackage ../applications/science/biology/bcftools { }; + emboss = callPackage ../applications/science/biology/emboss { }; htslib = callPackage ../development/libraries/science/biology/htslib { };