File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,9 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
197
197
${ optionalString ( self . enableSharedExecutables && self . stdenv . isLinux ) ''
198
198
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ ghc . ghc . name } /${ self . pname } -${ self . version } ";
199
199
'' }
200
+ ${ optionalString ( self . enableSharedExecutables && self . stdenv . isDarwin ) ''
201
+ configureFlags+=" --ghc-option=-optl=-Wl,-headerpad_max_install_names";
202
+ '' }
200
203
201
204
echo "configure flags: $extraConfigureFlags $configureFlags"
202
205
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
@@ -256,6 +259,13 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
256
259
ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
257
260
fi
258
261
262
+ ${ optionalString ( self . enableSharedExecutables && self . isExecutable && self . stdenv . isDarwin ) ''
263
+ for exe in $out/bin/* ; do
264
+ install_name_tool -add_rpath \
265
+ $out/lib/${ ghc . ghc . name } /${ self . pname } -${ self . version } $exe
266
+ done
267
+ '' }
268
+
259
269
eval "$postInstall"
260
270
'' ;
261
271
You can’t perform that action at this time.
0 commit comments