From 1cfc5f1da21b1527bc86e1b368bbda3885f125d1 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 26 Apr 2018 18:08:53 -0400 Subject: [PATCH 1/2] pythia: 8.226 -> 8.235, enable lhapdf6 plugin --- pkgs/development/libraries/physics/pythia/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/physics/pythia/default.nix b/pkgs/development/libraries/physics/pythia/default.nix index eca2807ce153..3f9f3f8498bd 100644 --- a/pkgs/development/libraries/physics/pythia/default.nix +++ b/pkgs/development/libraries/physics/pythia/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "pythia-${version}"; - version = "8.226"; + version = "8.235"; src = fetchurl { url = "http://home.thep.lu.se/~torbjorn/pythia8/pythia${builtins.replaceStrings ["."] [""] version}.tgz"; - sha256 = "1jfjkq78d1llrrm2k5pgsl92a5z8af9rx3n83rzv28lxrqdjix4g"; + sha256 = "17cfgs7v469pdnnzvlmdagcdhi0h419znqmaws90l9d8cmhhsbz8"; }; buildInputs = [ boost fastjet hepmc zlib rsync lhapdf ]; @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-shared" "--with-hepmc2=${hepmc}" + "--with-lhapdf6=${lhapdf}" ]; enableParallelBuilding = true; From 2f47c93ec848ae4b9594a13406f71982282ce0d7 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 26 Apr 2018 18:09:26 -0400 Subject: [PATCH 2/2] sacrifice: set LD_LIBRARY_PATH for pythia plugins to work --- pkgs/applications/science/physics/sacrifice/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/physics/sacrifice/default.nix b/pkgs/applications/science/physics/sacrifice/default.nix index 99d6df77f853..6c25f720ebf9 100644 --- a/pkgs/applications/science/physics/sacrifice/default.nix +++ b/pkgs/applications/science/physics/sacrifice/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, boost, hepmc, lhapdf, pythia }: +{ stdenv, fetchurl, boost, hepmc, lhapdf, pythia, makeWrapper }: stdenv.mkDerivation rec { name = "sacrifice-${version}"; @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ boost hepmc lhapdf pythia ]; + nativeBuildInputs = [ makeWrapper ]; patches = [ ./compat.patch @@ -27,8 +28,11 @@ stdenv.mkDerivation rec { "--with-pythia=${pythia}" ]; - postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = if stdenv.isDarwin then '' install_name_tool -add_rpath ${pythia}/lib "$out"/bin/run-pythia + '' else '' + wrapProgram $out/bin/run-pythia \ + --prefix LD_LIBRARY_PATH : "${pythia}/lib" ''; enableParallelBuilding = true;