3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix

48 lines
1.3 KiB
Nix
Raw Normal View History

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 {
pname = "sacrifice";
2016-07-25 07:01:27 +01:00
version = "1.0.0";
src = fetchurl {
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 ];
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}"
];
postInstall = if stdenv.isDarwin then ''
2018-04-25 19:58:23 +01:00
install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia
'' 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;
maintainers = with stdenv.lib.maintainers; [ veprbl ];
2016-07-25 07:01:27 +01:00
};
}