1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Mark __impureHostDeps paths as optional

Starting in macOS 11, the on-disk dylib bundles are no longer available,
but nixpkgs needs to be able to keep compatibility with older versions
that require `/usr/lib/libSystem.B.dylib` in `__impureHostDeps`. Allow
it to keep backwards compatibility with these versions by marking these
dependencies as optional.

Fixes #4658.

(cherry picked from commit c4355a52fa)
Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
Emily 2021-05-02 05:30:50 +01:00 committed by Domen Kožar
parent 998fe9d645
commit 405d78eafc
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -2065,7 +2065,9 @@ void DerivationGoal::startBuilder()
if (!found)
throw Error(format("derivation '%1%' requested impure path '%2%', but it was not in allowed-impure-host-deps") % drvPath % i);
dirsInChroot[i] = i;
/* Allow files in __impureHostDeps to be missing; e.g.
macOS 11+ has no /usr/lib/libSystem*.dylib */
dirsInChroot[i] = {i, true};
}
#if __linux__