about summary refs log tree commit diff
path: root/pkgs/applications/science/biology
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2008-10-05 09:03:58 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2008-10-05 09:03:58 +0000
commit29d6189e8b992feb66264c2e8935226746fcf7fd (patch)
treefc4694316a45b30f9323473cc7585406c6489a90 /pkgs/applications/science/biology
parent2391d84867ec519fbec73e380beb4813cdcbfb6e (diff)
downloadnixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar.gz
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar.bz2
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar.lz
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar.xz
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.tar.zst
nixlib-29d6189e8b992feb66264c2e8935226746fcf7fd.zip
The arb package (biology)
svn path=/nixpkgs/trunk/; revision=12956
Diffstat (limited to 'pkgs/applications/science/biology')
-rw-r--r--pkgs/applications/science/biology/arb/default.nix68
-rw-r--r--pkgs/applications/science/biology/arb/makefile.patch12
2 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/arb/default.nix b/pkgs/applications/science/biology/arb/default.nix
new file mode 100644
index 000000000000..d84d4f081c66
--- /dev/null
+++ b/pkgs/applications/science/biology/arb/default.nix
@@ -0,0 +1,68 @@
+args: with args;
+
+# NOTE: This package does not build on 64-bit systems. Because of some faulty
+# int->pointer arithmatic. The build scripts are abnormal - but it appears to
+# work.
+
+stdenv.mkDerivation {
+  name = "arb-2007-Dec-07";
+  src = fetchurl {
+    url = http://download.arb-home.de/release/2007_12_07/arbsrc.tgz;
+    sha256 = "04l7qj0wigg1h56a9d70hxhdr343v3dg5dhqrc7fahc1v4h8f1rd";
+  };
+
+  patches = [ ./makefile.patch ];
+
+  buildInputs = [glew mesa libpng x11 libXpm lesstif lynx freeglut libtiff rxp sablotron libXaw perl jdk ];
+
+  unpackPhase = ''
+    tar xzf $src
+  '';
+
+  buildPhase = ''
+    echo `make`   # avoids error signal
+    export ARBHOME=`pwd`
+    export PATH=$ARBHOME/bin:$PATH
+    make all
+  '';
+
+  installPhase = ''
+    datadir=/nix/var/lib/arb
+    ensureDir $out/lib
+    # link out shared location
+    ensureDir $datadir/lib/pts
+    chmod a+rwx $datadir/lib/pts
+    # cp -vau lib/pts $datadir/lib
+    rm -vrf lib/pts
+    ln -vs $datadir/lib/pts $out/lib/pts
+    # link out shared location
+    ensureDir $datadir/lib/nas
+    cp -vau lib/nas $datadir/lib
+    rm -vrf lib/nas
+    ln -vs $datadir/lib/nas $out/lib/nas
+    # bulk copy
+    cp -vau * $out
+    # replace arb script
+    mv $out/bin/arb $out/bin/arb.orig
+    cat > $out/bin/arb << ARB 
+#!/bin/sh
+
+echo Starting Nix compiled arb from $out
+echo Shared databases are located in $datadir
+export ARBHOME=$out
+export LD_LIBRARY=$ARBHOME/lib
+
+$out/bin/arb_ntree $*
+
+ARB
+    chmod +x $out/bin/arb
+  '';
+
+  meta = {
+    description     = "ARB software for sequence database handling and analysis";
+    longDescription = ''The ARB software is a graphically oriented package comprising various tools for sequence database handling and data analysis. A central database of processed (aligned) sequences and any type of additional data linked to the respective sequence entries is structured according to phylogeny or other user defined criteria''; 
+    license     = "non-free";
+    pkgMaintainer = "Pjotr Prins";
+    homepage    = http://www.arb-home.de/;
+  };
+}
diff --git a/pkgs/applications/science/biology/arb/makefile.patch b/pkgs/applications/science/biology/arb/makefile.patch
new file mode 100644
index 000000000000..8e7962511afd
--- /dev/null
+++ b/pkgs/applications/science/biology/arb/makefile.patch
@@ -0,0 +1,12 @@
+diff -r a1e04cdafd13 Makefile
+--- a/Makefile	Thu Sep 25 11:59:19 2008 +0200
++++ b/Makefile	Thu Sep 25 11:59:27 2008 +0200
+@@ -109,7 +109,7 @@ endif
+ 
+ ALLOWED_GCC_295_VERSIONS=2.95.3
+ ALLOWED_GCC_3xx_VERSIONS=3.2 3.3.1 3.3.3 3.3.4 3.3.5 3.3.6 3.4.0 3.4.2 3.4.3
+-ALLOWED_GCC_4xx_VERSIONS=4.0.0 4.0.2 4.0.3 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.3
++ALLOWED_GCC_4xx_VERSIONS=4.0.0 4.0.2 4.0.3 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.3 4.2.4
+ ALLOWED_GCC_VERSIONS=$(ALLOWED_GCC_295_VERSIONS) $(ALLOWED_GCC_3xx_VERSIONS) $(ALLOWED_GCC_4xx_VERSIONS)
+ 
+ GCC_VERSION_FOUND=$(shell $(GCC) -dumpversion)