Add a setup hook for fixing dylib install names on Darwin

Install names need to be absolute paths, otherwise programs that link
against the dylib won't work without setting $DYLD_LIBRARY_PATH.  Most
packages do this correctly, but some (like Boost and ICU) do not.
This setup hook absolutizes all install names.
This commit is contained in:
Eelco Dolstra
2014-01-15 13:39:52 +01:00
parent abf6896aaf
commit 8622548160
5 changed files with 51 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames
, toolset ? null
, enableRelease ? true
, enableDebug ? false
@@ -59,7 +59,9 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
buildInputs = [icu expat zlib bzip2 python];
buildInputs =
[ icu expat zlib bzip2 python ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
configureScript = "./bootstrap.sh";
configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python" + withToolset;