···178 unpack = stdenv.mkDerivation (bootstrapFiles // {
179 name = "unpack";
180000181 # This is by necessity a near-duplicate of unpack-bootstrap-tools.sh. If we refer to it directly,
182 # we can't make any changes to it due to our testing stdenv depending on it. Think of this as the
183 # unpack-bootstrap-tools.sh for the next round of bootstrap tools.
···209 $out/lib/system/libsystem_kernel.dylib
210211 # TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them!
212- libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
213214 for i in $libs; do
215 if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
···178 unpack = stdenv.mkDerivation (bootstrapFiles // {
179 name = "unpack";
180181+ reexportedLibrariesFile =
182+ ../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries;
183+184 # This is by necessity a near-duplicate of unpack-bootstrap-tools.sh. If we refer to it directly,
185 # we can't make any changes to it due to our testing stdenv depending on it. Think of this as the
186 # unpack-bootstrap-tools.sh for the next round of bootstrap tools.
···212 $out/lib/system/libsystem_kernel.dylib
213214 # TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them!
215+ libs=$(cat $reexportedLibrariesFile | grep -v '^#')
216217 for i in $libs; do
218 if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then