summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/biology/bcftools/default.nix2
-rw-r--r--pkgs/applications/science/biology/pal2nal/default.nix31
-rw-r--r--pkgs/applications/science/biology/paml/default.nix10
-rw-r--r--pkgs/applications/science/biology/plink-ng/default.nix34
-rw-r--r--pkgs/applications/science/logic/coq/8.5.nix25
-rw-r--r--pkgs/applications/science/logic/coq/default.nix6
-rw-r--r--pkgs/applications/science/logic/proverif/default.nix4
-rw-r--r--pkgs/applications/science/logic/yices/default.nix21
-rw-r--r--pkgs/applications/science/logic/z3/default.nix22
9 files changed, 84 insertions, 71 deletions
diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix
index 71ceca122244..7ae62b15d34a 100644
--- a/pkgs/applications/science/biology/bcftools/default.nix
+++ b/pkgs/applications/science/biology/bcftools/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   makeFlags = [
     "HSTDIR=${htslib}"
-    "prefix=$out"
+    "prefix=$(out)"
     "CC=cc"
   ];
 
diff --git a/pkgs/applications/science/biology/pal2nal/default.nix b/pkgs/applications/science/biology/pal2nal/default.nix
deleted file mode 100644
index 956f8b07e989..000000000000
--- a/pkgs/applications/science/biology/pal2nal/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{stdenv, fetchurl, perl, paml}:
-
-stdenv.mkDerivation {
-  name = "pal2nal-12";
-  src = fetchurl {
-    url = http://coot.embl.de/pal2nal/distribution/pal2nal.v12.tar.gz;
-    sha256 = "1qj9sq5skpa7vyccl9gxc5ls85jwiq8j6mr8wvacz4yhyg0afy04";
-  };
-
-  installPhase = ''
-    mkdir -p $out/bin
-
-    cp -v pal2nal.pl $out/bin 
-
-    mkdir -p $out/doc
-
-    cp -v README $out/doc
-  '';
-
-  meta = {
-    description     = "Program for aligning nucleotide sequences based on an aminoacid alignment";
-    longDescription = ''
-   PAL2NAL is a program that converts a multiple sequence alignment of proteins and the corresponding DNA (or mRNA) sequences into a codon alignment. The program automatically assigns the corresponding codon sequence even if the input DNA sequence has mismatches with the input protein sequence, or contains UTRs, polyA tails. It can also deal with frame shifts in the input alignment, which is suitable for the analysis of pseudogenes. The resulting codon alignment can further be subjected to the calculation of synonymous (KS) and non-synonymous (KA) substitution rates.
-
-If the input is a pair of sequences, PAL2NAL automatically calculates KS and KA by the codeml program in PAML.
-'';
-    license        = "non-commercial";
-    homepage       = http://coot.embl.de/pal2nal/;
-    pkgMaintainer  = "Pjotr Prins";
-  };
-}
diff --git a/pkgs/applications/science/biology/paml/default.nix b/pkgs/applications/science/biology/paml/default.nix
index cec0aa7e5eba..589c2809a931 100644
--- a/pkgs/applications/science/biology/paml/default.nix
+++ b/pkgs/applications/science/biology/paml/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  version = "4.2a";
+  version = "4.9c";
   name = "paml-${version}";
   src = fetchurl {
-    url = "http://abacus.gene.ucl.ac.uk/software/paml${version}.tar.gz";
-    sha256 = "0yywyrjgxrpavp50n00l01pl90b7pykgb2k53yrlykz9dnf583pb";
+    url = "http://abacus.gene.ucl.ac.uk/software/paml${version}.tgz";
+    sha256 = "18a1l47223l7jyjavm8a8la84q9k9kbxwmj7kz4z3pdx70qrl04j";
   };
 
   preBuild = ''
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   '';
   installPhase = ''
     mkdir -pv $out/bin
-    cp -v codeml $out/bin 
+    cp -v codeml $out/bin
     cp -v baseml $out/bin
     cp -v basemlg $out/bin
     cp -v chi2 $out/bin
@@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
     description     = "Phylogenetic Analysis by Maximum Likelihood (PAML)";
     longDescription = ''PAML is a package of programs for phylogenetic analyses of DNA or protein sequences using maximum likelihood. It is maintained and distributed for academic use free of charge by Ziheng Yang. ANSI C source codes are distributed for UNIX/Linux/Mac OSX, and executables are provided for MS Windows. PAML is not good for tree making. It may be used to estimate parameters and test hypotheses to study the evolutionary process, when you have reconstructed trees using other programs such as PAUP*, PHYLIP, MOLPHY, PhyML, RaxML, etc.'';
     license     = "non-commercial";
-    homepage    = http://abacus.gene.ucl.ac.uk/software/paml.html; 
+    homepage    = http://abacus.gene.ucl.ac.uk/software/paml.html;
   };
 }
diff --git a/pkgs/applications/science/biology/plink-ng/default.nix b/pkgs/applications/science/biology/plink-ng/default.nix
new file mode 100644
index 000000000000..eb4d2714a127
--- /dev/null
+++ b/pkgs/applications/science/biology/plink-ng/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, zlib, openblas, darwin}:
+
+stdenv.mkDerivation rec {
+  name = "plink-ng-${version}";
+  version = "1.90b3";
+
+  src = fetchFromGitHub {
+    owner = "chrchang";
+    repo = "plink-ng";
+    rev = "v${version}";
+    sha256 = "1zhffjbwpd50dxywccbnv1rxy9njwz73l4awc5j7i28rgj3davcq";
+  };
+
+  buildInputs = [ zlib ] ++ (if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.Accelerate ] else [ openblas ]) ;
+
+  buildPhase = ''
+    sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
+    ${if stdenv.cc.isClang then "sed -i 's|g++|clang++|g' Makefile.std" else ""}
+    make ZLIB=-lz ${if stdenv.isDarwin then "" else "BLASFLAGS=-lopenblas"} -f Makefile.std
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp plink $out/bin
+  '';
+
+  meta = {
+    description = "A comprehensive update to the PLINK association analysis toolset";
+    homepage = "https://www.cog-genomics.org/plink2";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
+
diff --git a/pkgs/applications/science/logic/coq/8.5.nix b/pkgs/applications/science/logic/coq/8.5.nix
index eb74891f511c..aae2101f50e9 100644
--- a/pkgs/applications/science/logic/coq/8.5.nix
+++ b/pkgs/applications/science/logic/coq/8.5.nix
@@ -2,11 +2,22 @@
 # - The csdp program used for the Micromega tactic is statically referenced.
 #   However, coq can build without csdp by setting it to null.
 #   In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
+# - The patch-level version can be specified through the `pl` argument to
+#   the derivation; it defaults to the greatest.
 
-{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
+{ stdenv, fetchurl, writeText, pkgconfig
+, ocaml, findlib, camlp5, ncurses
+, lablgtk ? null, csdp ? null
+, pl ? "3"
+}:
 
 let
-  version = "8.5pl2";
+  version = "8.5pl${pl}";
+  sha256 = {
+   "1" = "1w2xvm6w16khfn63bp95s25hnkn2ny3w0yqg3lq63gp11aqpbyjb";
+   "2" = "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
+   "3" = "0fyk2a4fpifibq8y8jhx1891k55qnsnlygglch64sva0bph94nrh";
+  }."${pl}";
   coq-version = "8.5";
   buildIde = lablgtk != null;
   ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
@@ -24,7 +35,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
-    sha256 = "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
+    inherit sha256;
   };
 
   buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
@@ -34,7 +45,7 @@ stdenv.mkDerivation {
     RM=$(type -tp rm)
     substituteInPlace configure --replace "/bin/uname" "$UNAME"
     substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
-    substituteInPlace configure.ml --replace "if arch = \"Darwin\" || arch = \"FreeBSD\" then \"md5" "if arch = \"Darwinx\" then \"md5"
+    substituteInPlace configure.ml --replace '"md5 -q"' '"md5sum"'
     ${csdpPatch}
   '';
 
@@ -57,7 +68,11 @@ stdenv.mkDerivation {
 
   prefixKey = "-prefix ";
 
-  buildFlags = "revision coq coqide";
+  buildFlags = "revision coq coqide bin/votour";
+
+  postInstall = ''
+    cp bin/votour $out/bin/
+  '';
 
   meta = with stdenv.lib; {
     description = "Coq proof assistant";
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 6c4211178077..f162fe4a86ea 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -72,9 +72,9 @@ stdenv.mkDerivation {
       (when (fboundp 'get-coq-library-directory)
         (inherit-local-permanent coq-library-directory (get-coq-library-directory))
         (coq-prog-args))
-      ; Pass proof-general's coq flags to flycheck command (pretty ugly, should probably be part of PG)
-      (inherit-local-permanent flycheck-command-wrapper-function (lambda (cmd)
-        (append (funcall (default-value 'flycheck-command-wrapper-function) cmd) (coq-coqtop-prog-args coq-load-path))))
+      (mapc (lambda (arg)
+        (when (file-directory-p (concat arg "/lib/coq/${coq-version}/user-contrib"))
+          (setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${coq-version}/user-contrib")))) '(${stdenv.lib.concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
     '';
   };
 
diff --git a/pkgs/applications/science/logic/proverif/default.nix b/pkgs/applications/science/logic/proverif/default.nix
index 4f5e91550787..8726f5affea7 100644
--- a/pkgs/applications/science/logic/proverif/default.nix
+++ b/pkgs/applications/science/logic/proverif/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "proverif-${version}";
-  version = "1.94";
+  version = "1.95";
 
   src = fetchurl {
     url    = "http://prosecco.gforge.inria.fr/personal/bblanche/proverif/proverif${version}.tar.gz";
-    sha256 = "0dv2hgk76y0ap7dwf80qd94dmxjw47c50iavxgq5702k1d6qap56";
+    sha256 = "01viwi6sccdxk723ycy1shklz8g29j5i3wj2mcwb3j7advvqmws2";
   };
 
   buildInputs = [ ocaml ];
diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix
index f495ee257ff0..cf5114b4a417 100644
--- a/pkgs/applications/science/logic/yices/default.nix
+++ b/pkgs/applications/science/logic/yices/default.nix
@@ -2,24 +2,31 @@
 
 stdenv.mkDerivation rec {
   name    = "yices-${version}";
-  version = "2.3.1";
+  version = "2.5.1";
 
   src = fetchurl {
-    url = "http://yices.csl.sri.com/cgi-bin/yices2-newnewdownload.cgi?file=yices-2.3.1-src.tar.gz&accept=I+Agree";
+    url = "http://yices.csl.sri.com/cgi-bin/yices2-newnewdownload.cgi?file=yices-${version}-src.tar.gz&accept=I+Agree";
     name = "yices-${version}-src.tar.gz";
-    sha256 = "1da70n0cah0dh3pk7fcrvjkszx9qmhc0csgl15jqa7bdh707k2zs";
+    sha256 = "1wfq6hcm54h0mqmbs1ip63i0ywlwnciav86sbzk3gafxyzg1nd0c";
   };
 
+  patchPhase = ''patchShebangs tests/regress/check.sh'';
+
   configureFlags = [ "--with-static-gmp=${gmp-static.out}/lib/libgmp.a"
                      "--with-static-gmp-include-dir=${gmp-static.dev}/include"
                    ];
   buildInputs = [ gmp-static gperf autoreconfHook ];
 
-  meta = {
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  installPhase = ''make install LDCONFIG=true'';
+
+  meta = with stdenv.lib; {
     description = "A high-performance theorem prover and SMT solver";
     homepage    = "http://yices.csl.sri.com";
-    license     = stdenv.lib.licenses.unfreeRedistributable;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = licenses.unfreeRedistributable;
+    platforms   = platforms.linux ++ platforms.darwin;
+    maintainers = [ maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/z3/default.nix b/pkgs/applications/science/logic/z3/default.nix
index 0e43abdd681d..fa5c9ba175e0 100644
--- a/pkgs/applications/science/logic/z3/default.nix
+++ b/pkgs/applications/science/logic/z3/default.nix
@@ -4,33 +4,21 @@ let
   python = python2;
 in stdenv.mkDerivation rec {
   name = "z3-${version}";
-  version = "4.4.1";
+  version = "4.5.0";
 
   src = fetchFromGitHub {
     owner  = "Z3Prover";
     repo   = "z3";
     rev    = "z3-${version}";
-    sha256 = "1ix100r1h00iph1bk5qx5963gpqaxmmx42r2vb5zglynchjif07c";
+    sha256 = "0ssp190ksak93hiz61z90x6hy9hcw1ywp8b2dzmbhn6fbd4bnxzp";
   };
 
   buildInputs = [ python ];
   enableParallelBuilding = true;
 
-  configurePhase = "${python.interpreter} scripts/mk_make.py --prefix=$out && cd build";
-
-  # z3's install phase is stupid because it tries to calculate the
-  # python package store location itself, meaning it'll attempt to
-  # write files into the nix store, and fail.
-  soext = if stdenv.system == "x86_64-darwin" then ".dylib" else ".so";
-  installPhase = ''
-    mkdir -p $out/bin $out/${python.sitePackages} $out/include
-    cp ../src/api/z3*.h       $out/include
-    cp ../src/api/c++/z3*.h   $out/include
-    cp z3                     $out/bin
-    cp libz3${soext}          $out/lib
-    cp libz3${soext}          $out/${python.sitePackages}
-    cp z3*.pyc                $out/${python.sitePackages}
-    cp ../src/api/python/*.py $out/${python.sitePackages}
+  configurePhase = ''
+    ${python.interpreter} scripts/mk_make.py --prefix=$out --python --pypkgdir=$out/${python.sitePackages}
+    cd build
   '';
 
   meta = {