From 9f1c07af20551eba1ef88e3d548b92a99b8da06d Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 18 Nov 2019 14:41:17 -0500 Subject: [PATCH 1/4] rivet: change license to gpl3 --- pkgs/development/libraries/physics/rivet/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix index 9870fadf6ef6..e727c17b616c 100644 --- a/pkgs/development/libraries/physics/rivet/default.nix +++ b/pkgs/development/libraries/physics/rivet/default.nix @@ -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 ]; }; } From 167e5cc9d733c45b9cd130f7157abcfe7ab75b8a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 20 May 2020 15:29:34 -0400 Subject: [PATCH 2/4] yoda: 1.7.7 -> 1.8.2, enable tests --- .../libraries/physics/yoda/default.nix | 18 +++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix index ad7bc7f52f54..9d4d60949c19 100644 --- a/pkgs/development/libraries/physics/yoda/default.nix +++ b/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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c60a8d72dd72..0ba7fc305dc8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25230,7 +25230,7 @@ in thepeg = callPackage ../development/libraries/physics/thepeg { }; yoda = callPackage ../development/libraries/physics/yoda { - python = python2; + python = python3; }; yoda-with-root = lowPrio (yoda.override { withRootSupport = true; From 9a2182eef6b20f031d29276f701515d3a71bef28 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 18 Nov 2019 16:04:36 -0500 Subject: [PATCH 3/4] rivet: 2.7.2 -> 3.1.1 --- .../libraries/physics/rivet/default.nix | 36 +++++++++---------- pkgs/top-level/all-packages.nix | 1 + pkgs/top-level/python-packages.nix | 4 +-- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix index e727c17b616c..bcf986346ac3 100644 --- a/pkgs/development/libraries/physics/rivet/default.nix +++ b/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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ba7fc305dc8..f7bda438efd2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25224,6 +25224,7 @@ in pythia = callPackage ../development/libraries/physics/pythia { }; rivet = callPackage ../development/libraries/physics/rivet { + hepmc = hepmc2; imagemagick = graphicsmagick-imagemagick-compat; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0856ec5cf100..50713b8129fe 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5579,8 +5579,8 @@ in { retworkx = callPackage ../development/python-modules/retworkx { }; - rivet = disabledIf isPy3k (toPythonModule (pkgs.rivet.override { - python2 = python; + rivet = disabledIf (!isPy3k) (toPythonModule (pkgs.rivet.override { + python3 = python; })); ripser = callPackage ../development/python-modules/ripser { }; From 475d5df12a19e8de4bc99a49bef81e37d7a57a34 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 23 May 2020 17:42:12 -0400 Subject: [PATCH 4/4] mcgrid: drop --- .../libraries/physics/mcgrid/default.nix | 30 ------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 pkgs/development/libraries/physics/mcgrid/default.nix diff --git a/pkgs/development/libraries/physics/mcgrid/default.nix b/pkgs/development/libraries/physics/mcgrid/default.nix deleted file mode 100644 index 27d8197a4362..000000000000 --- a/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/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1ef754ccba00..57c94fb0f982 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -280,6 +280,7 @@ mapAliases ({ matrique = spectral; # added 2020-01-27 mbedtls_1_3 = throw "mbedtls_1_3 is end of life, see https://tls.mbed.org/kb/how-to/upgrade-2.0"; # added 2019-12-08 mess = mame; # added 2019-10-30 + mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # added 2020-05-23 mcomix = throw "mcomix has been removed from nixpkgs, as it's unmaintained"; # added 2019-12-10 mirage = throw "mirage has been femoved from nixpkgs, as it's unmaintained"; # added 2019-12-10 mysql-client = hiPrio mariadb.client; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7bda438efd2..cda70a01dc95 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25215,8 +25215,6 @@ in lhapdf = callPackage ../development/libraries/physics/lhapdf { }; - mcgrid = callPackage ../development/libraries/physics/mcgrid { }; - mela = callPackage ../development/libraries/physics/mela { }; nlojet = callPackage ../development/libraries/physics/nlojet { };