summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2016-07-25 02:01:27 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2016-10-19 02:17:16 -0400
commit3324d8dc72df46985473e6c22413cf2cb0336771 (patch)
treee5fb9aa582ba278c4463bbd612ef4fee7f3bac84 /pkgs/applications/science
parent6aa5dc11f168a7d30bfe7b94cc0c23990f6ccc7f (diff)
downloadnixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar.gz
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar.bz2
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar.lz
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar.xz
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.tar.zst
nixlib-3324d8dc72df46985473e6c22413cf2cb0336771.zip
sacrifice: init at 1.0.0
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/physics/sacrifice/compat.patch12
-rw-r--r--pkgs/applications/science/physics/sacrifice/default.nix38
2 files changed, 50 insertions, 0 deletions
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..b2e642d6cde8
--- /dev/null
+++ b/pkgs/applications/science/physics/sacrifice/default.nix
@@ -0,0 +1,38 @@
+{ 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;
+  };
+}