Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS sandbox build #4102

Merged
merged 1 commit into from Oct 6, 2020
Merged

Fix macOS sandbox build #4102

merged 1 commit into from Oct 6, 2020

Conversation

@B4dM4n
Copy link
Contributor

@B4dM4n B4dM4n commented Oct 2, 2020

Building nix on macOS with sandbox = true currently fails with a Operation not permitted error:

libc++abi.dylib: terminating with uncaught exception of type nix::SysError: error: --- SysError ---
getting status of /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt: Operation not permitted
/nix/store/vkrcf5jchyibdxwrgwcifxp2digqshdy-bash-4.4-p23/bin/bash: line 1:  6910 Abort trap: 6           env -i NIX_CONF_DIR=/dummy HOME=/dummy /nix/store/lqbpssp3j4ji31zsnk0fqww0hjr5mmva-nix-3.0pre20200930_924712e/bin/nix show-config --json --experimental-features nix-command > doc/manual/conf-file.json.tmp
make: *** [doc/manual/local.mk:43: doc/manual/conf-file.json] Error 134
make: *** Waiting for unfinished jobs....
builder for '/nix/store/rfac0c56m8p8lgafpv3xmk9ibqn94bws-nix-3.0pre20200930_924712e.drv' failed with exit code 2

When nix is executed in the sandbox, it tries to read the default NIX_SSL_CERT_FILE file, which is not in the allowed paths.

Since the sandbox has no network access, NIX_SSL_CERT_FILE is not needed and can point to a non existent file.

@domenkozar domenkozar requested a review from edolstra Oct 5, 2020
@edolstra edolstra merged commit 2856878 into NixOS:master Oct 6, 2020
2 checks passed
2 checks passed
tests (ubuntu-latest)
Details
tests (macos-latest)
Details
@B4dM4n B4dM4n deleted the B4dM4n:macos-sandbox-build branch Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.