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

Merge pull request #13455 from DeterminateSystems/gustavderdrache/fix-sandbox-ifdef

Address ifdef problem with macOS/BSD sandboxing
This commit is contained in:
Sergei Zimmerman 2025-07-12 02:09:14 +03:00 committed by GitHub
commit ab3cd76e73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -14,6 +14,8 @@ jobs:
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
with:
install_url: "https://releases.nixos.org/nix/nix-2.29.1/install"
- run: nix --experimental-features 'nix-command flakes' flake show --all-systems --json
tests:
@ -36,6 +38,7 @@ jobs:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
with:
install_url: "https://releases.nixos.org/nix/nix-2.29.1/install"
# The sandbox would otherwise be disabled by default on Darwin
extra_nix_config: |
sandbox = true

View file

@ -197,7 +197,7 @@ bool useBuildUsers()
#ifdef __linux__
static bool b = (settings.buildUsersGroup != "" || settings.autoAllocateUids) && isRootUser();
return b;
#elif defined(__APPLE__) && defined(__FreeBSD__)
#elif defined(__APPLE__) || defined(__FreeBSD__)
static bool b = settings.buildUsersGroup != "" && isRootUser();
return b;
#else