about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/physics
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-06-04 10:19:13 +0000
committerAlyssa Ross <hi@alyssa.is>2020-06-04 22:45:31 +0000
commitda8562f302a145605a3270114ea7063daa82a173 (patch)
treeb27c6d509bad0ee5449f1fcf261a7ec3210df495 /nixpkgs/pkgs/development/libraries/physics
parent17df60ef482ef52b2088e1913de9cd436320612a (diff)
parent467ce5a9f45aaf96110b41eb863a56866e1c2c3c (diff)
downloadnixlib-da8562f302a145605a3270114ea7063daa82a173.tar
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.gz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.bz2
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.lz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.xz
nixlib-da8562f302a145605a3270114ea7063daa82a173.tar.zst
nixlib-da8562f302a145605a3270114ea7063daa82a173.zip
Merge commit '467ce5a9f45aaf96110b41eb863a56866e1c2c3c'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/physics')
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix2
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch (renamed from nixpkgs/pkgs/development/libraries/physics/cernlib/patch)0
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/mcgrid/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/rivet/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/yoda/default.nix18
6 files changed, 32 insertions, 66 deletions
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix b/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix
index c6a9835d13b6..8c4d688b697e 100644
--- a/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ gnumake imake makedepend ];
   sourceRoot = ".";
 
-  patches = [ ./patch ];
+  patches = [ ./patch.patch ];
 
   postPatch = ''
     substituteInPlace 2006/src/config/site.def \
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/patch b/nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch
index 2d75b6bf0f88..2d75b6bf0f88 100644
--- a/nixpkgs/pkgs/development/libraries/physics/cernlib/patch
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch
diff --git a/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix b/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix
index 3dfbaa96d31b..b854fa88cd67 100644
--- a/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix
+++ b/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "fastjet";
-  version = "3.3.3";
+  version = "3.3.4";
 
   src = fetchurl {
     url = "http://fastjet.fr/repo/fastjet-${version}.tar.gz";
-    sha256 = "0avkgn19plq593p872hirr0yj2vgjvsi88w68ngarbp55hla1c1h";
+    sha256 = "00zwvmnp2j79z95n9lgnq67q02bqfgirqla8j9y6jd8k3r052as3";
   };
 
   buildInputs = [ python2 ];
diff --git a/nixpkgs/pkgs/development/libraries/physics/mcgrid/default.nix b/nixpkgs/pkgs/development/libraries/physics/mcgrid/default.nix
deleted file mode 100644
index 27d8197a4362..000000000000
--- a/nixpkgs/pkgs/development/libraries/physics/mcgrid/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, fastnlo, rivet, pkgconfig }:
-
-stdenv.mkDerivation rec {
-  pname = "mcgrid";
-  version = "2.0.2";
-
-  src = fetchurl {
-    url = "https://www.hepforge.org/archive/mcgrid/${pname}-${version}.tar.gz";
-    sha256 = "1mw82x7zqbdchnd6shj3dirsav5i2cndp2hjwb8a8xdh4xh9zvfy";
-  };
-
-  buildInputs = [ fastnlo rivet ];
-  propagatedNativeBuildInputs = [ pkgconfig ];
-
-  preConfigure = ''
-    substituteInPlace mcgrid.pc.in \
-      --replace "Cflags:" "Cflags: -std=c++11"
-  '';
-
-  CXXFLAGS = "-std=c++11";
-  enableParallelBuilding = true;
-
-  meta = {
-    description = "A software package that provides access to the APPLgrid and fastNLO interpolation tools for Monte Carlo event generator codes, allowing for fast and flexible variations of scales, coupling parameters and PDFs in cutting edge leading- and next-to-leading-order QCD calculations";
-    license     = stdenv.lib.licenses.gpl3;
-    homepage    = "http://mcgrid.hepforge.org";
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ veprbl ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix b/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix
index 9870fadf6ef6..bcf986346ac3 100644
--- a/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix
+++ b/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix
@@ -1,20 +1,16 @@
-{ stdenv, fetchurl, fetchpatch, fastjet, ghostscript, gsl, hepmc2, imagemagick, less, python2, texlive, yoda, which, makeWrapper }:
+{ stdenv, fetchurl, fastjet, fastjet-contrib, ghostscript, gsl, hepmc, imagemagick, less, python3, rsync, texlive, yoda, which, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "rivet";
-  version = "2.7.2";
+  version = "3.1.1";
 
   src = fetchurl {
     url = "https://www.hepforge.org/archive/rivet/Rivet-${version}.tar.bz2";
-    sha256 = "1bxcb99a3l5d2gl93zgfzgw6v95kx1ss5045mkz3ciyw8w5nmb9l";
+    sha256 = "1cgr9jyfd9r7dwbk8fr3rys5dc74cmbx368441jvqngqymmb563w";
   };
 
   patches = [
     ./darwin.patch # configure relies on impure sw_vers to -Dunix
-    (fetchpatch {
-      url = "https://gitlab.com/hepcedar/rivet/commit/37bd34f52cce66946ebb311a8fe61bfc5f69cc00.diff";
-      sha256 = "0wj3ilpfq2gpc33bj3800l9vyvc9lrrlj1x9ss5qki0yiqd8i2aa";
-    })
   ];
 
   latex = texlive.combine { inherit (texlive)
@@ -32,26 +28,27 @@ stdenv.mkDerivation rec {
     xkeyval
     xstring
     ;};
-  buildInputs = [ hepmc2 imagemagick python2 latex makeWrapper ];
-  propagatedBuildInputs = [ fastjet ghostscript gsl yoda ];
+
+  nativeBuildInputs = [ rsync makeWrapper ];
+  buildInputs = [ hepmc imagemagick python3 latex python3.pkgs.yoda ];
+  propagatedBuildInputs = [ fastjet fastjet-contrib ];
 
   preConfigure = ''
-    substituteInPlace analyses/Makefile.in \
-      --replace "!(tmp)" ""
-    substituteInPlace bin/rivet-buildplugin.in \
+    substituteInPlace bin/rivet-build.in \
+      --replace 'num_jobs=$(getconf _NPROCESSORS_ONLN)' 'num_jobs=''${NIX_BUILD_CORES:-$(getconf _NPROCESSORS_ONLN)}' \
       --replace 'which' '"${which}/bin/which"' \
       --replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"}  #' \
-      --replace 'mycxxflags="' "mycxxflags=\"-std=c++11 $NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
+      --replace 'mycxxflags="' "mycxxflags=\"$NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
   '';
 
   preInstall = ''
     substituteInPlace bin/make-plots \
       --replace '"which"' '"${which}/bin/which"' \
-      --replace '"latex"' '"${latex}/bin/latex"' \
-      --replace '"dvips"' '"${latex}/bin/dvips"' \
+      --replace '"latex"' '"'$latex'/bin/latex"' \
+      --replace '"dvips"' '"'$latex'/bin/dvips"' \
       --replace '"ps2pdf"' '"${ghostscript}/bin/ps2pdf"' \
       --replace '"ps2eps"' '"${ghostscript}/bin/ps2eps"' \
-      --replace '"kpsewhich"' '"${latex}/bin/kpsewhich"' \
+      --replace '"kpsewhich"' '"'$latex'/bin/kpsewhich"' \
       --replace '"convert"' '"${imagemagick.out}/bin/convert"'
     substituteInPlace bin/rivet \
       --replace '"less"' '"${less}/bin/less"'
@@ -62,9 +59,12 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--with-fastjet=${fastjet}"
-    "--with-hepmc=${hepmc2}"
     "--with-yoda=${yoda}"
-  ];
+  ] ++ (if stdenv.lib.versions.major hepmc.version == "3" then [
+    "--with-hepmc3=${hepmc}"
+  ] else [
+    "--with-hepmc=${hepmc}"
+  ]);
 
   enableParallelBuilding = true;
 
@@ -74,11 +74,11 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A framework for comparison of experimental measurements from high-energy particle colliders to theory predictions";
-    license     = stdenv.lib.licenses.gpl2;
+    license     = licenses.gpl3;
     homepage    = "https://rivet.hepforge.org";
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ veprbl ];
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix b/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
index ad7bc7f52f54..9d4d60949c19 100644
--- a/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
+++ b/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
@@ -1,22 +1,14 @@
-{ stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }:
+{ stdenv, fetchurl, python, root, makeWrapper, zlib, withRootSupport ? false }:
 
 stdenv.mkDerivation rec {
   pname = "yoda";
-  version = "1.7.7";
+  version = "1.8.2";
 
   src = fetchurl {
     url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
-    sha256 = "1ki88rscnym0vjxpfgql8m1lrc7vm1jb9w4jhw9lvv3rk84lpdng";
+    sha256 = "1nqbv334iwdvbsc5bw8g936cxzc1hyzv9r8kjy4v124vrw8qqmc9";
   };
 
-  patches = [
-    # fixes "TypeError: expected bytes, str found" in writeYODA()
-    (fetchpatch {
-      url = "https://gitlab.com/hepcedar/yoda/commit/d2bbbe92912457f8a29b440cbfa0b39daf28ec34.diff";
-      sha256 = "1x60piswpxwak61r2sdclsc8pzi1fshpkjnxlyflsa1iap77vkq8";
-    })
-  ];
-
   nativeBuildInputs = with python.pkgs; [ cython makeWrapper ];
   buildInputs = [ python ]
     ++ (with python.pkgs; [ numpy matplotlib ])
@@ -27,6 +19,7 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     touch pyext/yoda/*.{pyx,pxd}
+    patchShebangs .
   '';
 
   postInstall = ''
@@ -37,6 +30,9 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "format" ];
 
+  doInstallCheck = true;
+  installCheckTarget = "check";
+
   meta = {
     description = "Provides small set of data analysis (specifically histogramming) classes";
     license     = stdenv.lib.licenses.gpl3;