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

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.

@edolstra edolstra merged commit 2856878 into NixOS:master Oct 6, 2020
@B4dM4n B4dM4n deleted the macos-sandbox-build branch October 7, 2020 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants