summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-10-21 21:58:45 +0200
committerGitHub <noreply@github.com>2016-10-21 21:58:45 +0200
commit9c0b5e4b226807c2250c87cf2ce4eae6983c39cd (patch)
tree4392cd6249c6d540b9ed3e0fafadcf60df86196b /pkgs/applications/science
parent5df5198979f5386688d17b91cb4041b9d59a2087 (diff)
parentef96b4865968f360ccf7e5ecf4f98a54bc3eda88 (diff)
downloadnixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar.gz
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar.bz2
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar.lz
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar.xz
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.tar.zst
nixlib-9c0b5e4b226807c2250c87cf2ce4eae6983c39cd.zip
Merge pull request #19666 from veprbl/hep_for_upstream
Add fastjet, hepmc, yoda, rivet, lhapdf, herwig, pythia, sacrifice, nlojet++
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/misc/root/default.nix5
-rw-r--r--pkgs/applications/science/physics/sacrifice/compat.patch12
-rw-r--r--pkgs/applications/science/physics/sacrifice/default.nix39
3 files changed, 54 insertions, 2 deletions
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix
index 808af776e28b..c358ea84550d 100644
--- a/pkgs/applications/science/misc/root/default.nix
+++ b/pkgs/applications/science/misc/root/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkgconfig, python
+{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkgconfig, python2
 , libX11, libXpm, libXft, libXext, zlib, lzma, gsl, Cocoa }:
 
 stdenv.mkDerivation rec {
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "00f3v3l8nimfkcxpn9qpyh3h23na0mi4wkds2y5gwqh8wh3jryq9";
   };
 
-  buildInputs = [ cmake pcre pkgconfig python zlib lzma gsl ]
+  buildInputs = [ cmake pcre pkgconfig python2 zlib lzma gsl ]
     ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext ]
     ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa ]
     ;
@@ -69,5 +69,6 @@ stdenv.mkDerivation rec {
     homepage = "https://root.cern.ch/";
     description = "A data analysis framework";
     platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.maintainers; [ veprbl ];
   };
 }
diff --git a/pkgs/applications/science/physics/sacrifice/compat.patch b/pkgs/applications/science/physics/sacrifice/compat.patch
new file mode 100644
index 000000000000..c66b91b76280
--- /dev/null
+++ b/pkgs/applications/science/physics/sacrifice/compat.patch
@@ -0,0 +1,12 @@
+diff --git a/src/PythiaMain.cxx b/src/PythiaMain.cxx
+index 0e5ddd2..2b626ab 100644
+--- a/src/PythiaMain.cxx
++++ b/src/PythiaMain.cxx
+@@ -96,7 +96,6 @@ int main(int argc, char **argv){
+   HepMCConverter pythiaToHepMC;
+ 
+   pythiaToHepMC.set_store_pdf(true);
+-  pythiaToHepMC.set_crash_on_problem(true);
+   
+   if(photosHandler.isEnabled()){
+     photosHandler.initialise();
diff --git a/pkgs/applications/science/physics/sacrifice/default.nix b/pkgs/applications/science/physics/sacrifice/default.nix
new file mode 100644
index 000000000000..056706653d02
--- /dev/null
+++ b/pkgs/applications/science/physics/sacrifice/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, boost, hepmc, lhapdf, pythia }:
+
+stdenv.mkDerivation rec {
+  name = "sacrifice-${version}";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "http://www.hepforge.org/archive/agile/Sacrifice-1.0.0.tar.gz";
+    sha256 = "10bvpq63kmszy1habydwncm0j1dgvam0fkrmvkgbkvf804dcjp6g";
+  };
+
+  buildInputs = [ boost hepmc lhapdf pythia ];
+
+  patches = [
+    ./compat.patch
+  ];
+
+  preConfigure = ''
+    substituteInPlace configure --replace HAVE_LCG=yes HAVE_LCG=no
+  ''
+  + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure --replace LIB_SUFFIX=\"so\" LIB_SUFFIX=\"dylib\"
+  '';
+
+  configureFlags = [
+    "--with-HepMC=${hepmc}"
+    "--with-pythia=${pythia}"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A standalone contribution to AGILe for steering Pythia 8";
+    license     = stdenv.lib.licenses.gpl2;
+    homepage    = https://agile.hepforge.org/trac/wiki/Sacrifice;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.maintainers; [ veprbl ];
+  };
+}