2019-08-05 21:54:56 +01:00
|
|
|
{ stdenv, fetchurl, boost, hepmc2, lhapdf, pythia, makeWrapper }:
|
2016-07-25 07:01:27 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sacrifice";
|
2016-07-25 07:01:27 +01:00
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.hepforge.org/archive/agile/Sacrifice-1.0.0.tar.gz";
|
2016-07-25 07:01:27 +01:00
|
|
|
sha256 = "10bvpq63kmszy1habydwncm0j1dgvam0fkrmvkgbkvf804dcjp6g";
|
|
|
|
};
|
|
|
|
|
2019-08-05 21:54:56 +01:00
|
|
|
buildInputs = [ boost hepmc2 lhapdf pythia ];
|
2018-04-26 23:09:26 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2016-07-25 07:01:27 +01:00
|
|
|
|
|
|
|
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 = [
|
2019-08-05 21:54:56 +01:00
|
|
|
"--with-HepMC=${hepmc2}"
|
2016-07-25 07:01:27 +01:00
|
|
|
"--with-pythia=${pythia}"
|
|
|
|
];
|
|
|
|
|
2018-04-26 23:09:26 +01:00
|
|
|
postInstall = if stdenv.isDarwin then ''
|
2018-04-25 19:58:23 +01:00
|
|
|
install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia
|
2018-04-26 23:09:26 +01:00
|
|
|
'' else ''
|
|
|
|
wrapProgram $out/bin/run-pythia \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${pythia}/lib"
|
2018-04-25 19:58:23 +01:00
|
|
|
'';
|
|
|
|
|
2016-07-25 07:01:27 +01:00
|
|
|
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;
|
2016-10-22 11:05:23 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ veprbl ];
|
2016-07-25 07:01:27 +01:00
|
|
|
};
|
|
|
|
}
|