-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nix 2.4 regression, missing paths when evaluating inside the sandbox. #5495
Comments
also reproducible in a plain shell with src=$(nix-store --add "$PWD") # in a nixpkgs checkout
export NIX_STATE_DIR=$(mktemp -d) # does not fail if this isn't set
nix-env -f $src --drv-path -qa >/dev/null # but not without --drv-path |
The new dummy store ( BTW, the error
suggests that there is some IFD going on, or at least import-from-a-path-copied-to-the-store, which we should avoid in Nixpkgs... |
not just IFD, that error message (though maybe not the exact same error) also happens when evaluating |
Another example that seems to be causing problems: outPath = builtins.path { inherit filter name; path = origSrc; }; You can look at this and other examples on NixOS/nixpkgs#144197 (comment), where I was trying to "fix" the eval errors I was getting by simplifying them, until I eventually gave up because it simply went to the next |
I think the issue is that In hindsight, this makes a lot of sense (forgetting about the fact that it’s a breaking change). I’m not sure what the “proper” fix should be, but I think that a decent solution would be to set Maybe that would also be a good use-case for recursive-nix, but since it’s still experimental so far that’s out of reach for nixpkgs. |
With nix 2.4 the fact that we set NIX_STATE_DIR, but kept the original store became a hard error. We work around it here by forcing the use of a fresh, sandbox-local, store. See regnat's wonderful analysis for more information: NixOS/nix#5495 (comment)
Indeed setting |
Mirror ca5ecbe to workaround NIX_STATE_DIR errors. As with the other workaround, see: NixOS/nix#5495 (comment)
Urgh indeed. I guess |
Describe the bug
While updating the
nix
package in Nixpkgs, NixOS/nixpkgs#144197 (comment)The
nixpkgs-release-checks
derivation invokes a fewnix-*
commands inside the sandbox. This used to work.The command that breaks inside the sandbox is:
Steps To Reproduce
nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks
Expected behavior
Build success.
nix-env --version
outputMy NixOS nix-daemon is
nix-env (Nix) 2.4pre20210707_02dd6bb
The Nix in the sandbox is the first 2.4 release.
Additional context
I've tried a different store location, but that did not make a difference; see diff.
Console log (regardless of diff above):
The text was updated successfully, but these errors were encountered: