git.iko.soy/typeable/nixpkgs
on master help sign in
sacrifice: set LD_LIBRARY_PATH for pythia plugins to work
commit2f47c93ec848ae4b9594a13406f71982282ce0d7 authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateThu 26 Apr 2018, 18:09 (9 years ago) parent1cfc5f1
1 file changed+6−2
pkgs/applications/science/physics/sacrifice/default.nix+6−2
pkgs/applications/science/physics/sacrifice/default.nix+6−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, boost, hepmc, lhapdf, pythia }:
1+{ stdenv, fetchurl, boost, hepmc, lhapdf, pythia, makeWrapper }:
22
33stdenv.mkDerivation rec {
44 name = "sacrifice-${version}";
@@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
1010 };
1111
1212 buildInputs = [ boost hepmc lhapdf pythia ];
13+ nativeBuildInputs = [ makeWrapper ];
1314
1415 patches = [
1516 ./compat.patch
@@ -27,8 +28,11 @@ stdenv.mkDerivation rec {
2728 "--with-pythia=${pythia}"
2829 ];
2930
30− postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
31+ postInstall = if stdenv.isDarwin then ''
3132 install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia
33+ '' else ''
34+ wrapProgram $out/bin/run-pythia \
35+ --prefix LD_LIBRARY_PATH : "${pythia}/lib"
3236 '';
3337
3438 enableParallelBuilding = true;