From 72e7d87b01d52968ca018e9b54f433abfb7994dd Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 7 Oct 2020 22:41:30 -0400 Subject: [PATCH] pythia: add hepmc3 support --- pkgs/development/libraries/physics/pythia/default.nix | 11 +++++++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/physics/pythia/default.nix b/pkgs/development/libraries/physics/pythia/default.nix index 3105476c8429..53b2889a25c8 100644 --- a/pkgs/development/libraries/physics/pythia/default.nix +++ b/pkgs/development/libraries/physics/pythia/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, boost, fastjet, hepmc2, lhapdf, rsync, zlib }: +{ stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }: stdenv.mkDerivation rec { pname = "pythia"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0gli6zf8931i7kyminppisc9d0q69xxnalvhld5fgnkh4q82nz6d"; }; - buildInputs = [ boost fastjet hepmc2 zlib rsync lhapdf ]; + buildInputs = [ boost fastjet hepmc zlib rsync lhapdf ]; preConfigure = '' patchShebangs ./configure @@ -17,9 +17,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-shared" - "--with-hepmc2=${hepmc2}" "--with-lhapdf6=${lhapdf}" - ]; + ] ++ (if stdenv.lib.versions.major hepmc.version == "3" then [ + "--with-hepmc3=${hepmc}" + ] else [ + "--with-hepmc2=${hepmc}" + ]); enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab0a1cf5c2f5..c026c8b678c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26755,7 +26755,9 @@ in nlojet = callPackage ../development/libraries/physics/nlojet { }; - pythia = callPackage ../development/libraries/physics/pythia { }; + pythia = callPackage ../development/libraries/physics/pythia { + hepmc = hepmc2; + }; rivet = callPackage ../development/libraries/physics/rivet { hepmc = hepmc2;