mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-14 16:14:50 +00:00
Merge pull request #320374 from al3xtjames/zig-darwin-purity
zig: fix build on Darwin with sandbox enabled
This commit is contained in:
commit
1f7e0b772c
@ -38,6 +38,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.isDarwin [
|
||||
"/System/Library/CoreServices/.SystemVersionPlatform.plist"
|
||||
"/System/Library/CoreServices/SystemVersion.plist"
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"doc"
|
||||
|
@ -38,6 +38,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.isDarwin [
|
||||
"/System/Library/CoreServices/.SystemVersionPlatform.plist"
|
||||
"/System/Library/CoreServices/SystemVersion.plist"
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"doc"
|
||||
|
@ -36,6 +36,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.isDarwin [
|
||||
"/System/Library/CoreServices/.SystemVersionPlatform.plist"
|
||||
"/System/Library/CoreServices/SystemVersion.plist"
|
||||
];
|
||||
|
||||
env.ZIG_GLOBAL_CACHE_DIR = "$TMPDIR/zig-cache";
|
||||
|
||||
# Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't
|
||||
|
Loading…
Reference in New Issue
Block a user