diff --git a/pkgs/development/compilers/zig/0.11/default.nix b/pkgs/development/compilers/zig/0.11/default.nix index b0b9292da617e..bf73f49072d74 100644 --- a/pkgs/development/compilers/zig/0.11/default.nix +++ b/pkgs/development/compilers/zig/0.11/default.nix @@ -39,6 +39,16 @@ stdenv.mkDerivation (finalAttrs: { llvm ]); + # On Darwin, Zig calls std.zig.system.darwin.macos.detect during the build, + # which parses /System/Library/CoreServices/SystemVersion.plist and + # /System/Library/CoreServices/.SystemVersionPlatform.plist to determine the + # OS version. This causes the build to fail during stage 3 with + # OSVersionDetectionFail when the sandbox is enabled. + __impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [ + "/System/Library/CoreServices/.SystemVersionPlatform.plist" + "/System/Library/CoreServices/SystemVersion.plist" + ]; + outputs = [ "out" "doc"