1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

Merge pull request #13458 from NixOS/mergify/bp/2.30-maintenance/pr-13455

Address ifdef problem with macOS/BSD sandboxing (backport #13455)
This commit is contained in:
Eelco Dolstra 2025-07-12 08:55:18 +02:00 committed by GitHub
commit 857365c859
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: with:
fetch-depth: 0 fetch-depth: 0
- uses: cachix/install-nix-action@v31 - 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 - run: nix --experimental-features 'nix-command flakes' flake show --all-systems --json
tests: tests:
@ -36,6 +38,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- uses: cachix/install-nix-action@v31 - uses: cachix/install-nix-action@v31
with: with:
install_url: "https://releases.nixos.org/nix/nix-2.29.1/install"
# The sandbox would otherwise be disabled by default on Darwin # The sandbox would otherwise be disabled by default on Darwin
extra_nix_config: | extra_nix_config: |
sandbox = true sandbox = true

View file

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