diff options
5 files changed, 57 insertions, 3 deletions
diff --git a/pkgs/applications/science/physics/sherpa/default.nix b/pkgs/applications/science/physics/sherpa/default.nix index d863964ad90a..e815ddfc1c2f 100644 --- a/pkgs/applications/science/physics/sherpa/default.nix +++ b/pkgs/applications/science/physics/sherpa/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gfortran, sqlite }: +{ stdenv, fetchurl, gfortran, hepmc, fastjet, lhapdf, rivet, sqlite }: stdenv.mkDerivation rec { name = "sherpa-${version}"; @@ -9,10 +9,20 @@ stdenv.mkDerivation rec { sha256 = "13vkz6w8kqyv8sgy3mxnlps5ykml5rnlj50vjj0pp9rgbl5y8ali"; }; - buildInputs = [ gfortran sqlite ]; + buildInputs = [ gfortran sqlite lhapdf rivet ]; enableParallelBuilding = true; + configureFlags = [ + "--with-sqlite3=${sqlite.dev}" + "--enable-hepmc2=${hepmc}" + "--enable-fastjet=${fastjet}" + "--enable-lhapdf=${lhapdf}" + "--enable-rivet=${rivet}" + ]; + + CXXFLAGS = "-std=c++11"; # needed for rivet on OSX + meta = { description = "Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions"; license = stdenv.lib.licenses.gpl2; diff --git a/pkgs/development/libraries/physics/fastnlo/default.nix b/pkgs/development/libraries/physics/fastnlo/default.nix index 703681337063..307bf1b27db3 100644 --- a/pkgs/development/libraries/physics/fastnlo/default.nix +++ b/pkgs/development/libraries/physics/fastnlo/default.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { buildInputs = [ boost lhapdf root yoda ]; + CXXFLAGS="-std=c++11"; # for yoda + + configureFlags = [ + "--with-yoda=${yoda}" + ]; + enableParallelBuilding = true; meta = { diff --git a/pkgs/development/libraries/physics/mcgrid/default.nix b/pkgs/development/libraries/physics/mcgrid/default.nix index 033bf2f214fc..aabe132e73b3 100644 --- a/pkgs/development/libraries/physics/mcgrid/default.nix +++ b/pkgs/development/libraries/physics/mcgrid/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fastnlo, rivet, sherpa }: +{ stdenv, fetchurl, fastnlo, rivet, pkgconfig, sherpa }: stdenv.mkDerivation rec { name = "mcgrid-${version}"; @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ fastnlo rivet ]; + propagatedNativeBuildInputs = [ pkgconfig ]; preConfigure = '' substituteInPlace mcgrid.pc.in \ diff --git a/pkgs/development/libraries/physics/rivet/darwin.patch b/pkgs/development/libraries/physics/rivet/darwin.patch new file mode 100644 index 000000000000..2d397f1da6ca --- /dev/null +++ b/pkgs/development/libraries/physics/rivet/darwin.patch @@ -0,0 +1,33 @@ +diff --git a/include/Rivet/Tools/osdir.hh b/include/Rivet/Tools/osdir.hh +index 05f06ca..59af7de 100644 +--- a/include/Rivet/Tools/osdir.hh ++++ b/include/Rivet/Tools/osdir.hh +@@ -21,7 +21,7 @@ + + /// @cond OSDIR + +-#if defined(unix) || defined(__unix) || defined(__unix__) ++#if defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__) + #define OSLINK_OSDIR_POSIX + #elif defined(_WIN32) + #define OSLINK_OSDIR_WINDOWS +@@ -32,18 +32,7 @@ + #include <string> + + #if defined(OSLINK_OSDIR_NOTSUPPORTED) +- +-namespace oslink +-{ +- class directory +- { +- public: +- directory(const std::string&) { } +- operator void*() const { return (void*)0; } +- std::string next() { return ""; } +- }; +-} +- ++#error Platform misdetected or oslink is not implemented + #elif defined(OSLINK_OSDIR_POSIX) + + #include <sys/types.h> diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix index 91b5881d1a8b..a82c14fee773 100644 --- a/pkgs/development/libraries/physics/rivet/default.nix +++ b/pkgs/development/libraries/physics/rivet/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { pythonPath = []; # python wrapper support + patches = [ + ./darwin.patch # configure relies on impure sw_vers to -Dunix + ]; + latex = texlive.combine { inherit (texlive) scheme-basic collection-pstricks |