-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
home: Add buildEnvWithNoChroot to help avoid darwin sandbox failures #3729
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
edf7cd2
to
f5a846d
Compare
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
f5a846d
to
d9595de
Compare
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
d9595de
to
fcf985f
Compare
fcf985f
to
8b196b5
Compare
Allows setting `__noChroot = true` on select derivations that assemble large numbers of paths. This may be used to avoid sandbox failures on darwin, see NixOS/nix#4119 and the `sandbox` option in `man nix.conf`. I wish there was a way to do something akin to overlays for config, alas there is not afaik, so the only way is to add an option. Since this is opt-in, anyone enabling it thus understands the “risks” of disabling the sandbox, however the risk for these derivations should be fairly low, and this allows enabling the sandbox more generally on Darwin, which is beneficial. I have only added to the derivations that started giving me problems, others may suffer from others but these are definitely likely to have huge dependency lists therefore exposing the problem. Despite this being intended only for use on Darwin, it is left somewhat generic and thus up to the user to do set it to e.g. `stdenv.hostPlatform.isDarwin`.
8b196b5
to
d7319b7
Compare
Description
Sets
__noChroot = true
on selectbuildEnv
derivations that assemblelarge numbers of paths. This may be used to avoid sandbox failures on
darwin, see NixOS/nix#4119 and the
sandbox
option in
man nix.conf
.I wish there was a way to do something akin to overlays for config, alas
there is not afaik, so the only way is to add an option. Since this is
opt-in, anyone enabling it thus understands the “risks” of disabling the
sandbox, however the risk for these derivations should be fairly low,
and this allows enabling the sandbox more generally on Darwin, which is
beneficial.
I have only added to the derivations that started giving me problems,
others may suffer from others but these are definitely likely to have
huge dependency lists therefore exposing the problem.
I’m open to a different name for the option, hard to come up with something representative but concise. I have not added any tests since it’s a rather cumbersome scenario to test, and may also be flaky. The default path (option disabled) is I expect already well-covered.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Added myself as module maintainer. See example.
Added myself and the module files to
.github/CODEOWNERS
.