Skip to content

Commit

Permalink
zig_0_11: fix build on Darwin with sandbox enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaskorz committed Jan 24, 2025
1 parent c6baa83 commit a4f58b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/compilers/zig/0.11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a4f58b1

Please sign in to comment.