summary refs log tree commit diff
path: root/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-07-05 19:24:07 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-07-07 11:43:27 +0200
commit5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e (patch)
treeda58f317bd439fcab0e71f605baf9953556f3a7f /pkgs/stdenv/darwin
parent52b8b68e8235f496e6bb972ae36e30bd8946a633 (diff)
downloadnixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar.gz
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar.bz2
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar.lz
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar.xz
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.tar.zst
nixpkgs-5024e4aa39d6d2ddfe52ee481f7a1f728d5b8d1e.zip
stdenv-bootstrap-tools: update unpack to use $reexportedLibrariesFile
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r--pkgs/stdenv/darwin/make-bootstrap-tools.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
index 6fc9d7f0c10..66c5f419f2f 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