mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
Merge pull request #13455 from DeterminateSystems/gustavderdrache/fix-sandbox-ifdef
Address ifdef problem with macOS/BSD sandboxing
This commit is contained in:
commit
ab3cd76e73
2 changed files with 4 additions and 1 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue