-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add --pure --impure in nix-build to avoid changing system-wide useSandbox #1670
Comments
Can I please be assigned to it as I would like to try to implement it myself? |
Can you elaborate on what you mean here? All nix.conf options can be set locally via |
@copumpkin nope, my impression was that the only way to turn off/on sandboxing is through |
That's certainly true if you use the daemon, and can be a security feature depending on your trust model. |
As @copumpkin points out this is already possibly with |
Well, with the daemon your |
@edolstra, @copumpkin thanks! Good to know it is coming with nix 1.12. Any news on when it might be released? |
@kuznero that's not the takeaway I'd take from it. The 1.12 change is just a very superficial syntax change, allowing you to write a quick On a release date there isn't a firm one, but at NixCon, @edolstra said that people should start testing it and filing bugs, so that's promising and probably means "soon" 😄 |
@copumpkin thanks for details |
Depending on the use case, you may replace |
Wouldn't the |
It will not even write to the store, so yes. (Only the sources and dependencies will be realized in the store by nix-daemon. nix-shell will build in the current directory, which should be empty.) @kuznero did not mention his use case: this method will not help with installing software that needs access to the network during the build, but it will help with inspection of or intervention into the build process. (I've learnt this method from @symphorien here: NixOS/nixpkgs#29947 (comment).) |
If It looks like there's already a mechanism for that (https://github.com/NixOS/nix/blob/c30330df6f67c81986dfb124631bc756c8e58c0d/src/libmain/common-args.cc), but apperently right now |
Add
--pure
/--impure
innix-build
to avoid changing system-wideuseSandbox
all the time.The text was updated successfully, but these errors were encountered: