Skip to content

Commit 98cff3f

Browse files
committedJul 25, 2017
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.
1 parent 47821f1 commit 98cff3f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎pkgs/stdenv/darwin/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ in rec {
5050
args = [ ./unpack-bootstrap-tools.sh ];
5151

5252
inherit (bootstrapFiles) mkdir bzip2 cpio tarball;
53+
reexportedLibrariesFile =
54+
../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries;
5355

5456
__sandboxProfile = binShClosure + libSystemProfile;
5557
};

‎pkgs/stdenv/darwin/unpack-bootstrap-tools.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install_name_tool \
2626
$out/lib/system/libsystem_kernel.dylib
2727

2828
# TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them!
29-
libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
29+
libs=$(cat $reexportedLibrariesFile | grep -v '^#')
3030

3131
for i in $libs; do
3232
if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then

0 commit comments

Comments
 (0)