From 5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 5 Jul 2018 19:24:07 +0200 Subject: [PATCH] stdenv-bootstrap-tools: update unpack to use $reexportedLibrariesFile --- pkgs/stdenv/darwin/make-bootstrap-tools.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 6fc9d7f0c101..66c5f419f2f6 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -178,6 +178,9 @@ in rec { unpack = stdenv.mkDerivation (bootstrapFiles // { name = "unpack"; + reexportedLibrariesFile = + ../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries; + # This is by necessity a near-duplicate of unpack-bootstrap-tools.sh. If we refer to it directly, # we can't make any changes to it due to our testing stdenv depending on it. Think of this as the # unpack-bootstrap-tools.sh for the next round of bootstrap tools. @@ -209,7 +212,7 @@ in rec { $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