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/astronomy/xearth/default.nix4
-rw-r--r--pkgs/applications/science/biology/bcftools/default.nix4
-rw-r--r--pkgs/applications/science/biology/megahit/default.nix13
-rw-r--r--pkgs/applications/science/biology/niftyreg/default.nix2
-rw-r--r--pkgs/applications/science/biology/strelka/default.nix5
-rw-r--r--pkgs/applications/science/biology/sumatools/default.nix2
-rw-r--r--pkgs/applications/science/logic/avy/default.nix4
-rw-r--r--pkgs/applications/science/logic/coq/default.nix2
-rw-r--r--pkgs/applications/science/logic/minisat/clang.diff45
-rw-r--r--pkgs/applications/science/logic/minisat/darwin.patch26
-rw-r--r--pkgs/applications/science/logic/minisat/default.nix24
-rw-r--r--pkgs/applications/science/logic/minisat/unstable.nix23
-rw-r--r--pkgs/applications/science/logic/prover9/default.nix2
-rw-r--r--pkgs/applications/science/logic/stp/default.nix5
-rw-r--r--pkgs/applications/science/math/calculix/default.nix4
-rw-r--r--pkgs/applications/science/math/msieve/default.nix2
-rw-r--r--pkgs/applications/science/math/polymake/default.nix2
-rw-r--r--pkgs/applications/science/math/ries/default.nix2
-rw-r--r--pkgs/applications/science/math/scilab/default.nix2
-rw-r--r--pkgs/applications/science/misc/colmap/default.nix13
-rw-r--r--pkgs/applications/science/misc/megam/default.nix2
-rw-r--r--pkgs/applications/science/misc/simgrid/default.nix42
-rw-r--r--pkgs/applications/science/physics/xfitter/default.nix7
23 files changed, 72 insertions, 165 deletions
diff --git a/pkgs/applications/science/astronomy/xearth/default.nix b/pkgs/applications/science/astronomy/xearth/default.nix
index e9fc0607998..752e25b4d8d 100644
--- a/pkgs/applications/science/astronomy/xearth/default.nix
+++ b/pkgs/applications/science/astronomy/xearth/default.nix
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ imake gccmakedep ];
   buildInputs = [ libXt libXext ];
 
-  installFlags=[ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"];
-  installTargets="install install.man";
+  installFlags = [ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"];
+  installTargets = [ "install" "install.man" ];
 
   meta = with stdenv.lib; {
     description = "sets the X root window to an image of the Earth";
diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix
index 33e4de0d95a..4a6a464de46 100644
--- a/pkgs/applications/science/biology/bcftools/default.nix
+++ b/pkgs/applications/science/biology/bcftools/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "bcftools";
-  version = "1.9";
+  version = "1.10.2";
 
   src = fetchurl {
     url = "https://github.com/samtools/bcftools/releases/download/${version}/${pname}-${version}.tar.bz2";
-    sha256 = "1j3h638i8kgihzyrlnpj82xg1b23sijibys9hvwari3fy7kd0dkg";
+    sha256 = "0b2f6lqhxdlrvfjqxv7a4nzqj68c1j4avn16iqxwwm80kn302wzm";
   };
 
   buildInputs = [ htslib zlib bzip2 lzma curl perl python ];
diff --git a/pkgs/applications/science/biology/megahit/default.nix b/pkgs/applications/science/biology/megahit/default.nix
index 56bb35b64df..86414980177 100644
--- a/pkgs/applications/science/biology/megahit/default.nix
+++ b/pkgs/applications/science/biology/megahit/default.nix
@@ -1,23 +1,20 @@
-{ stdenv, fetchFromGitHub, zlib }:
+{ stdenv, fetchFromGitHub, cmake, zlib }:
 
 stdenv.mkDerivation rec {
   pname    = "megahit";
-  version = "1.1.4";
+  version = "1.2.9";
 
   src = fetchFromGitHub {
     owner = "voutcn";
     repo = "megahit";
     rev = "v${version}";
-    sha256 = "011k0776w76l03zmy70kfd3y9zjmdnspfbs9fcxmnl3bdwd36kcw";
+    sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c";
   };
 
+  nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
 
-  installPhase = ''
-    for bin in megahit_sdbg_build megahit megahit_asm_core megahit_toolkit; do
-        install -vD $bin $out/bin/$bin
-    done
-  '';
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     description = "An ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph";
diff --git a/pkgs/applications/science/biology/niftyreg/default.nix b/pkgs/applications/science/biology/niftyreg/default.nix
index 6379f2c3282..48bd1b21ecd 100644
--- a/pkgs/applications/science/biology/niftyreg/default.nix
+++ b/pkgs/applications/science/biology/niftyreg/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "07v9v9s41lvw72wpb1jgh2nzanyc994779bd35p76vg8mzifmprl";
   };
 
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
+
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
   enableParallelBuilding = true;
diff --git a/pkgs/applications/science/biology/strelka/default.nix b/pkgs/applications/science/biology/strelka/default.nix
index cb83b19269b..184dcb48a0d 100644
--- a/pkgs/applications/science/biology/strelka/default.nix
+++ b/pkgs/applications/science/biology/strelka/default.nix
@@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib python2 ];
 
-  NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error=maybe-uninitialized"
+    "-Wno-error=pessimizing-move"
+  ];
 
   preConfigure = ''
     sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
diff --git a/pkgs/applications/science/biology/sumatools/default.nix b/pkgs/applications/science/biology/sumatools/default.nix
index f9042f30011..5230fcd2eb6 100644
--- a/pkgs/applications/science/biology/sumatools/default.nix
+++ b/pkgs/applications/science/biology/sumatools/default.nix
@@ -22,7 +22,7 @@ in rec {
       rev = "sumalib_v${version}";
       sha256 = "0hwkrxzfz7m5wdjvmrhkjg8kis378iaqr5n4nhdhkwwhn8x1jn5a";
     };
-    makeFlags = "PREFIX=$(out)";
+    makeFlags = [ "PREFIX=$(out)" ];
     inherit meta;
   };
 
diff --git a/pkgs/applications/science/logic/avy/default.nix b/pkgs/applications/science/logic/avy/default.nix
index 9b59828ddab..b43e0c6fbf1 100644
--- a/pkgs/applications/science/logic/avy/default.nix
+++ b/pkgs/applications/science/logic/avy/default.nix
@@ -12,14 +12,14 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [ cmake zlib boost.out boost.dev ];
-  NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ]
+  NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ]
     # Squelch endless stream of warnings on same few things
     ++ stdenv.lib.optionals stdenv.cc.isClang [
       "-Wno-empty-body"
       "-Wno-tautological-compare"
       "-Wc++11-compat-deprecated-writable-strings"
       "-Wno-deprecated"
-    ];
+    ]);
 
   prePatch = ''
     sed -i -e '1i#include <stdint.h>' abc/src/bdd/dsd/dsd.h
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 2378cb9408e..ac001540e09 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -143,7 +143,7 @@ self = stdenv.mkDerivation {
 
   prefixKey = "-prefix ";
 
-  buildFlags = "revision coq coqide bin/votour";
+  buildFlags = [ "revision" "coq" "coqide" "bin/votour" ];
 
   createFindlibDestdir = true;
 
diff --git a/pkgs/applications/science/logic/minisat/clang.diff b/pkgs/applications/science/logic/minisat/clang.diff
deleted file mode 100644
index 5b5072c71f3..00000000000
--- a/pkgs/applications/science/logic/minisat/clang.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -aur minisat/core/SolverTypes.h minisat.clang/core/SolverTypes.h
---- minisat/core/SolverTypes.h	2010-07-10 18:07:36.000000000 +0200
-+++ minisat.clang/core/SolverTypes.h	2016-05-13 12:14:50.759671959 +0200
-@@ -47,7 +47,7 @@
-     int     x;
- 
-     // Use this as a constructor:
--    friend Lit mkLit(Var var, bool sign = false);
-+    //friend Lit mkLit(Var var, bool sign = false);
- 
-     bool operator == (Lit p) const { return x == p.x; }
-     bool operator != (Lit p) const { return x != p.x; }
-@@ -55,7 +55,7 @@
- };
- 
- 
--inline  Lit  mkLit     (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
-+inline  Lit  mkLit     (Var var, bool sign = false) { Lit p; p.x = var + var + (int)sign; return p; }
- inline  Lit  operator ~(Lit p)              { Lit q; q.x = p.x ^ 1; return q; }
- inline  Lit  operator ^(Lit p, bool b)      { Lit q; q.x = p.x ^ (unsigned int)b; return q; }
- inline  bool sign      (Lit p)              { return p.x & 1; }
-diff -aur minisat/utils/Options.h minisat.clang/utils/Options.h
---- minisat/utils/Options.h	2010-07-10 18:07:36.000000000 +0200
-+++ minisat.clang/utils/Options.h	2016-05-13 12:14:50.759671959 +0200
-@@ -282,15 +282,15 @@
-         if (range.begin == INT64_MIN)
-             fprintf(stderr, "imin");
-         else
--            fprintf(stderr, "%4"PRIi64, range.begin);
-+            fprintf(stderr, "%4" PRIi64, range.begin);
- 
-         fprintf(stderr, " .. ");
-         if (range.end == INT64_MAX)
-             fprintf(stderr, "imax");
-         else
--            fprintf(stderr, "%4"PRIi64, range.end);
-+            fprintf(stderr, "%4" PRIi64, range.end);
- 
--        fprintf(stderr, "] (default: %"PRIi64")\n", value);
-+        fprintf(stderr, "] (default: %" PRIi64 ")\n", value);
-         if (verbose){
-             fprintf(stderr, "\n        %s\n", description);
-             fprintf(stderr, "\n");
-Only in minisat.clang/utils: Options.o
-Only in minisat.clang/utils: System.o
diff --git a/pkgs/applications/science/logic/minisat/darwin.patch b/pkgs/applications/science/logic/minisat/darwin.patch
deleted file mode 100644
index f2b618d6bb3..00000000000
--- a/pkgs/applications/science/logic/minisat/darwin.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://github.com/fasterthanlime/homebrew-mingw/blob/master/Library/Formula/minisat.rb
-
-diff --git a/utils/System.cc b/utils/System.cc
-index a7cf53f..feeaf3c 100644
---- a/utils/System.cc
-+++ b/utils/System.cc
-@@ -78,16 +78,17 @@ double Minisat::memUsed(void) {
-     struct rusage ru;
-     getrusage(RUSAGE_SELF, &ru);
-     return (double)ru.ru_maxrss / 1024; }
--double MiniSat::memUsedPeak(void) { return memUsed(); }
-+double Minisat::memUsedPeak(void) { return memUsed(); }
- 
- 
- #elif defined(__APPLE__)
- #include <malloc/malloc.h>
- 
--double Minisat::memUsed(void) {
-+double Minisat::memUsed() {
-     malloc_statistics_t t;
-     malloc_zone_statistics(NULL, &t);
-     return (double)t.max_size_in_use / (1024*1024); }
-+double Minisat::memUsedPeak() { return memUsed(); }
- 
- #else
- double Minisat::memUsed() { 
diff --git a/pkgs/applications/science/logic/minisat/default.nix b/pkgs/applications/science/logic/minisat/default.nix
index 34051a1da40..6b642832b83 100644
--- a/pkgs/applications/science/logic/minisat/default.nix
+++ b/pkgs/applications/science/logic/minisat/default.nix
@@ -1,27 +1,19 @@
-{ stdenv, fetchurl, zlib }:
+{ stdenv, fetchFromGitHub, cmake, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "minisat";
-  version = "2.2.0";
+  version = "2.2.1";
 
-  src = fetchurl {
-    url = "http://minisat.se/downloads/${pname}-${version}.tar.gz";
-    sha256 = "023qdnsb6i18yrrawlhckm47q8x0sl7chpvvw3gssfyw3j2pv5cj";
+  src = fetchFromGitHub {
+    owner = "stp";
+    repo = pname;
+    rev = "releases/${version}";
+    sha256 = "14vcbjnlia00lpyv2fhbmw3wbc9bk9h7bln9zpyc3nwiz5cbjz4a";
   };
 
-  patches =
-    [ ./darwin.patch ]
-    ++ stdenv.lib.optionals stdenv.cc.isClang [ ./clang.diff ];
-
+  nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
 
-  preBuild = "cd simp";
-  makeFlags = [ "r" "MROOT=.." ];
-  installPhase = ''
-    mkdir -p $out/bin
-    cp minisat_release $out/bin/minisat
-  '';
-
   meta = with stdenv.lib; {
     description = "Compact and readable SAT solver";
     maintainers = with maintainers; [ gebner raskin ];
diff --git a/pkgs/applications/science/logic/minisat/unstable.nix b/pkgs/applications/science/logic/minisat/unstable.nix
deleted file mode 100644
index ef46c694acb..00000000000
--- a/pkgs/applications/science/logic/minisat/unstable.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ stdenv, fetchFromGitHub, zlib, cmake }:
-
-stdenv.mkDerivation {
-  name = "minisat-unstable-2013-09-25";
-
-  src = fetchFromGitHub {
-    owner = "niklasso";
-    repo = "minisat";
-    rev = "37dc6c67e2af26379d88ce349eb9c4c6160e8543";
-    sha256 = "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq";
-  };
-
-  buildInputs = [ zlib ];
-  nativeBuildInputs =  [ cmake ];
-
-  meta = with stdenv.lib; {
-    description = "Compact and readable SAT solver";
-    maintainers = with maintainers; [ mic92 ];
-    platforms = platforms.unix;
-    license = licenses.mit;
-    homepage = http://minisat.se/;
-  };
-}
diff --git a/pkgs/applications/science/logic/prover9/default.nix b/pkgs/applications/science/logic/prover9/default.nix
index a4538e1070a..9528a5942a4 100644
--- a/pkgs/applications/science/logic/prover9/default.nix
+++ b/pkgs/applications/science/logic/prover9/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     done
   '';
 
-  buildFlags = "all";
+  buildFlags = [ "all" ];
 
   checkPhase = "make test1";
 
diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix
index 0ea659d1927..dd00eda1b57 100644
--- a/pkgs/applications/science/logic/stp/default.nix
+++ b/pkgs/applications/science/logic/stp/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl, python3, python3Packages, zlib, minisatUnstable, cryptominisat }:
+{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl
+, python3, python3Packages, zlib, minisat, cryptominisat }:
 
 stdenv.mkDerivation rec {
   pname = "stp";
@@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "1yg2v4wmswh1sigk47drwsxyayr472mf4i47lqmlcgn9hhbx1q87";
   };
 
-  buildInputs = [ boost zlib minisatUnstable cryptominisat python3 ];
+  buildInputs = [ boost zlib minisat cryptominisat python3 ];
   nativeBuildInputs = [ cmake bison flex perl ];
   preConfigure = ''
     python_install_dir=$out/${python3Packages.python.sitePackages}
diff --git a/pkgs/applications/science/math/calculix/default.nix b/pkgs/applications/science/math/calculix/default.nix
index 24d5f99ec32..6f2d61cd80f 100644
--- a/pkgs/applications/science/math/calculix/default.nix
+++ b/pkgs/applications/science/math/calculix/default.nix
@@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ arpack spooles openblas ];
 
-  NIX_CFLAGS_COMPILE = [
-    "-I${spooles}/include/spooles"
-  ];
+  NIX_CFLAGS_COMPILE = "-I${spooles}/include/spooles";
 
   patches = [
     ./calculix.patch
diff --git a/pkgs/applications/science/math/msieve/default.nix b/pkgs/applications/science/math/msieve/default.nix
index 6e1926810df..643d990feb8 100644
--- a/pkgs/applications/science/math/msieve/default.nix
+++ b/pkgs/applications/science/math/msieve/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   ECM = if ecm == null then "0" else "1";
 
   # Doesn't hurt Linux but lets clang-based platforms like Darwin work fine too
-  makeFlags = "CC=cc all";
+  makeFlags = [ "CC=cc" "all" ];
 
   installPhase = ''
     mkdir -p $out/bin/
diff --git a/pkgs/applications/science/math/polymake/default.nix b/pkgs/applications/science/math/polymake/default.nix
index fdc4de7b028..d4f13f84f81 100644
--- a/pkgs/applications/science/math/polymake/default.nix
+++ b/pkgs/applications/science/math/polymake/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     makeWrapper ninja ant perl
   ];
 
-  ninjaFlags = "-C build/Opt";
+  ninjaFlags = [ "-C" "build/Opt" ];
 
   postInstall = ''
     for i in "$out"/bin/*; do
diff --git a/pkgs/applications/science/math/ries/default.nix b/pkgs/applications/science/math/ries/default.nix
index 4b237a01a3e..b244ee75b30 100644
--- a/pkgs/applications/science/math/ries/default.nix
+++ b/pkgs/applications/science/math/ries/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "1h2wvd4k7f0l0i1vm9niz453xdbcs3nxccmri50qyrzzzc1b0842";
   };
 
-  makeFlags = "PREFIX=$(out)";
+  makeFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
     homepage = https://mrob.com/pub/ries/;
diff --git a/pkgs/applications/science/math/scilab/default.nix b/pkgs/applications/science/math/scilab/default.nix
index 432280a18fb..02f1f4e58a9 100644
--- a/pkgs/applications/science/math/scilab/default.nix
+++ b/pkgs/applications/science/math/scilab/default.nix
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
     ++ lib.optional (!withXaw3d) "--with-local-xaw"
   ;
 
-  makeFlags = "all";
+  makeFlags = [ "all" ];
 
   meta = {
     homepage = http://www.scilab.org/;
diff --git a/pkgs/applications/science/misc/colmap/default.nix b/pkgs/applications/science/misc/colmap/default.nix
index 672569ed100..da118f6bca5 100644
--- a/pkgs/applications/science/misc/colmap/default.nix
+++ b/pkgs/applications/science/misc/colmap/default.nix
@@ -1,11 +1,11 @@
-{ mkDerivation, lib, fetchFromGitHub, cmake, boost, ceres-solver, eigen,
+{ mkDerivation, lib, fetchpatch, fetchFromGitHub, cmake, boost, ceres-solver, eigen,
   freeimage, glog, libGLU, glew, qtbase,
   cudaSupport ? false, cudatoolkit ? null }:
 
 assert !cudaSupport || cudatoolkit != null;
 
 let boost_static = boost.override { enableStatic = true; };
-in 
+in
 mkDerivation rec {
   version = "3.5";
   pname = "colmap";
@@ -15,7 +15,14 @@ mkDerivation rec {
      rev = version;
      sha256 = "1vnb62p0y2bnga173wmjs0lnyqdjikv0fkcxjzxm8187khk2lly8";
   };
-  
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/colmap/colmap/commit/6af3d8b0048cecc3b9fc6f4e78c3214dd038180b.patch";
+      sha256 = "1zv5girmv4hv78w1xn131v8njwhpbyylc1m15731lnhrs8bri0jq";
+    })
+  ];
+
   buildInputs = [
     boost_static ceres-solver eigen
     freeimage glog libGLU glew qtbase
diff --git a/pkgs/applications/science/misc/megam/default.nix b/pkgs/applications/science/misc/megam/default.nix
index f86bed854a2..6cdc86d20eb 100644
--- a/pkgs/applications/science/misc/megam/default.nix
+++ b/pkgs/applications/science/misc/megam/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ makeWrapper ];
 
-  makeFlags = "CAML_INCLUDES=${ocaml}/lib/ocaml/caml";
+  makeFlags = [ "CAML_INCLUDES=${ocaml}/lib/ocaml/caml" ];
 
   # see https://bugzilla.redhat.com/show_bug.cgi?id=435559
   dontStrip = true;
diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix
index 58f464575b0..44b0f5d84b6 100644
--- a/pkgs/applications/science/misc/simgrid/default.nix
+++ b/pkgs/applications/science/misc/simgrid/default.nix
@@ -54,28 +54,28 @@ stdenv.mkDerivation rec {
   #
   # For more information see:
   # https://simgrid.org/doc/3.22/Installing_SimGrid.html#simgrid-compilation-options)
-  cmakeFlags= ''
-    -Denable_documentation=${optionOnOff buildDocumentation}
-    -Denable_java=${optionOnOff buildJavaBindings}
-    -Denable_fortran=${optionOnOff fortranSupport}
-    -Denable_model-checking=${optionOnOff modelCheckingSupport}
-    -Denable_ns3=off
-    -Denable_lua=off
-    -Denable_lib_in_jar=off
-    -Denable_maintainer_mode=off
-    -Denable_mallocators=on
-    -Denable_debug=on
-    -Denable_smpi=on
-    -Denable_smpi_ISP_testsuite=${optionOnOff moreTests}
-    -Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}
-    -Denable_compile_warnings=${optionOnOff debug}
-    -Denable_compile_optimizations=${optionOnOff (!debug)}
-    -Denable_lto=${optionOnOff (!debug)}
-  '';
-  # -Denable_lua=${optionOnOff luaSupport}
-  # -Denable_smpi_papi=${optionOnOff moreTests}
+  cmakeFlags = [
+    "-Denable_documentation=${optionOnOff buildDocumentation}"
+    "-Denable_java=${optionOnOff buildJavaBindings}"
+    "-Denable_fortran=${optionOnOff fortranSupport}"
+    "-Denable_model-checking=${optionOnOff modelCheckingSupport}"
+    "-Denable_ns3=off"
+    "-Denable_lua=off"
+    "-Denable_lib_in_jar=off"
+    "-Denable_maintainer_mode=off"
+    "-Denable_mallocators=on"
+    "-Denable_debug=on"
+    "-Denable_smpi=on"
+    "-Denable_smpi_ISP_testsuite=${optionOnOff moreTests}"
+    "-Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}"
+    "-Denable_compile_warnings=${optionOnOff debug}"
+    "-Denable_compile_optimizations=${optionOnOff (!debug)}"
+    "-Denable_lto=${optionOnOff (!debug)}"
+    # "-Denable_lua=${optionOnOff luaSupport}"
+    # "-Denable_smpi_papi=${optionOnOff moreTests}"
+  ];
 
-  makeFlags = optionalString debug "VERBOSE=1";
+  makeFlags = optional debug "VERBOSE=1";
 
   # Some Perl scripts are called to generate test during build which
   # is before the fixupPhase, so do this manualy here:
diff --git a/pkgs/applications/science/physics/xfitter/default.nix b/pkgs/applications/science/physics/xfitter/default.nix
index 2af93961e02..818bea7d0ff 100644
--- a/pkgs/applications/science/physics/xfitter/default.nix
+++ b/pkgs/applications/science/physics/xfitter/default.nix
@@ -2,19 +2,20 @@
 
 stdenv.mkDerivation rec {
   pname = "xfitter";
-  version = "2.0.0";
+  version = "2.0.1";
 
   src = fetchurl {
     name = "${pname}-${version}.tgz";
     url = "https://www.xfitter.org/xFitter/xFitter/DownloadPage?action=AttachFile&do=get&target=${pname}-${version}.tgz";
-    sha256 = "0j47s8laq3aqjlgp769yicvgyzqjb738a3rqss51d9fjrihi2515";
+    sha256 = "0kmgc67nw5flp92yw5x6l2vsnhwsfi5z2a20404anisdgdjs8zc6";
   };
 
   patches = [
     ./undefined_behavior.patch
   ];
 
-  CXXFLAGS = "-Werror=return-type";
+  # patch needs to updated due to version bump
+  #CXXFLAGS = "-Werror=return-type";
 
   preConfigure =
   # Fix F77LD to workaround for a following build error: