File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
3131 gfortran
3232 cmake
3333 pkg-config
34- autoPatchelfHook
35- ] ;
34+ ]
35+ ++ lib . optionals stdenv . hostPlatform . isLinux [ autoPatchelfHook ] ;
3636
3737 buildInputs = [
3838 libzip
@@ -41,9 +41,13 @@ stdenv.mkDerivation rec {
4141
4242 enableParallelBuilding = true ;
4343
44- preFixup = ''
45- patchelf --add-rpath $out/lib/SHERPA-MC $out/bin/Sherpa
46- '' ;
44+ preFixup =
45+ lib . optionalString stdenv . hostPlatform . isDarwin ''
46+ install_name_tool -add_rpath "$out"/lib/SHERPA-MC "$out"/bin/Sherpa
47+ ''
48+ + lib . optionalString stdenv . hostPlatform . isLinux ''
49+ patchelf --add-rpath "$out"/lib/SHERPA-MC "$out"/bin/Sherpa
50+ '' ;
4751
4852 meta = {
4953 description = "Monte Carlo event generator for the Simulation of High-Energy Reactions of PArticles" ;
You can’t perform that action at this time.
0 commit comments