about summary refs log tree commit diff
path: root/pkgs/applications/science/biology/diamond
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-04-12 13:05:22 +0200
committerMatthias Beyer <mail@beyermatthias.de>2017-04-12 13:05:57 +0200
commit6239da6ade413ce89503d608c9b827ac17359e64 (patch)
treea90e404a3b80c5d4161c5ae124ef4d54e5eedb57 /pkgs/applications/science/biology/diamond
parentffa2bc2382a82994755c60f8bab1193dc62fd3fa (diff)
downloadnixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar.gz
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar.bz2
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar.lz
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar.xz
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.tar.zst
nixlib-6239da6ade413ce89503d608c9b827ac17359e64.zip
diamond: init at 0.8.36
Diffstat (limited to 'pkgs/applications/science/biology/diamond')
-rw-r--r--pkgs/applications/science/biology/diamond/default.nix41
-rw-r--r--pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch20
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/diamond/default.nix b/pkgs/applications/science/biology/diamond/default.nix
new file mode 100644
index 000000000000..a45e5df2f528
--- /dev/null
+++ b/pkgs/applications/science/biology/diamond/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, cmake, gcc, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "diamond-0.8.36";
+
+  src = fetchurl {
+    url = "https://github.com/bbuchfink/diamond/archive/v0.8.36.tar.gz";
+    sha256 = "092smzzjcg51n3x4h84k52ijpz9m40ri838j9k2i463ribc3c8rh";
+  };
+
+  patches = [
+    ./diamond-0.8.36-no-warning.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Accelerated BLAST compatible local sequence aligner";
+    longDescription = ''
+      A sequence aligner for protein and translated DNA
+      searches and functions as a drop-in replacement for the NCBI BLAST
+      software tools. It is suitable for protein-protein search as well as
+      DNA-protein search on short reads and longer sequences including contigs
+      and assemblies, providing a speedup of BLAST ranging up to x20,000.
+
+      DIAMOND is developed by Benjamin Buchfink. Feel free to contact him for support (Email Twitter).
+
+      If you use DIAMOND in published research, please cite
+      B. Buchfink, Xie C., D. Huson,
+      "Fast and sensitive protein alignment using DIAMOND",
+      Nature Methods 12, 59-60 (2015).
+        '';
+    homepage = https://github.com/bbuchfink/diamond;
+    license = {
+      fullName = "University of Tuebingen, Benjamin Buchfink";
+      url = https://raw.githubusercontent.com/bbuchfink/diamond/master/src/COPYING;
+    };
+    maintainers = [ maintainers.metabar ];
+  };
+}
diff --git a/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch b/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
new file mode 100644
index 000000000000..a16d475c5564
--- /dev/null
+++ b/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
@@ -0,0 +1,20 @@
+diff -u -r diamond-0.8.36/src/dp/scalar_traceback.h diamond-0.8.36-patched/src/dp/scalar_traceback.h
+--- diamond-0.8.36/src/dp/scalar_traceback.h	2017-02-06 16:32:05.000000000 +0100
++++ diamond-0.8.36-patched/src/dp/scalar_traceback.h	2017-02-23 15:13:24.000000000 +0100
+@@ -19,6 +19,7 @@
+ #ifndef SCALAR_TRACEBACK_H_
+ #define SCALAR_TRACEBACK_H_
+ 
++#include <cmath>
+ #include <exception>
+ #include "../basic/score_matrix.h"
+ 
+@@ -31,7 +32,7 @@
+ template<>
+ inline bool almost_equal<float>(float x, float y)
+ {
+-	return abs(x - y) < 0.001f;
++	return std::abs(x - y) < 0.001f;
+ }
+ 
+ template<typename _score>