diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-07-25 14:25:37 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-07-25 14:35:43 -0400 |
commit | 98cff3f44679665ce0d1da474865db10a1de1439 (patch) | |
tree | aaed1d626dbcc979cf531681203dc8d0ad7e5f17 | |
parent | 47821f1cf0cd853d3d3dfea9259e02fea2766327 (diff) | |
download | nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar.gz nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar.bz2 nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar.lz nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar.xz nixlib-98cff3f44679665ce0d1da474865db10a1de1439.tar.zst nixlib-98cff3f44679665ce0d1da474865db10a1de1439.zip |
darwin stdenv: Ensure libSystem reexports the right libraries
The logic was made pure for the normal libSystem, but this change never made it to the bootstrap tools. Deduplication the logic as the comment suggests would have prevented this, but here's a stop-gap until we do so.
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/darwin/unpack-bootstrap-tools.sh | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index e7ce04b0a148..cac33a1bebb2 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -50,6 +50,8 @@ in rec { args = [ ./unpack-bootstrap-tools.sh ]; inherit (bootstrapFiles) mkdir bzip2 cpio tarball; + reexportedLibrariesFile = + ../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries; __sandboxProfile = binShClosure + libSystemProfile; }; diff --git a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh b/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh index 66c4e9ebeda9..0da80ec5ce56 100644 --- a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh @@ -26,7 +26,7 @@ install_name_tool \ $out/lib/system/libsystem_kernel.dylib # TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them! -libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }') +libs=$(cat $reexportedLibrariesFile | grep -v '^#') for i in $libs; do if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then |