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

Many commands fail with "access to absolute path … is forbidden in pure eval mode" #5825

Closed
NobbZ opened this issue Dec 23, 2021 · 4 comments
Labels

Comments

@NobbZ
Copy link
Contributor

NobbZ commented Dec 23, 2021

Describe the bug

Many flake related subcommands (so far I have discovered eval, run, shell, build so far) fail with an error telling about a file not beeing accessible in pure eval mode.

Neither does the path exist for me, nor do I knowingly reference that path somewhere in my configuration.

$ nix eval nixpkgs#hello.version
error: access to absolute path '/.config/nixpkgs/overlays.nix' is forbidden in pure eval mode (use '--impure' to override)

Steps To Reproduce

  1. Install a nix from master
  2. allow flakes
  3. run nix eval nixpkgs#hello.version

Expected behavior

The expression is correctly evaluated.

nix-env --version output

$ nix --version
nix (Nix) 2.6.0pre20211222_ddd7839

@NobbZ NobbZ added the bug label Dec 23, 2021
@NobbZ
Copy link
Contributor Author

NobbZ commented Dec 23, 2021

I am not quite sure which update introduced it.

A commit I know is still working properly is 18e4851.

Sadly I do not have the time to bisect this in advance.

(The commit above was taken from my systems flake lockfile, there have been other changes after that to the lock file, though I currently can't reproduce which of them has the bug and which not)

@MagicRB
Copy link
Contributor

MagicRB commented Dec 23, 2021

Same here, I'll get the working commit later

@thufschmitt
Copy link
Member

Yes, that was introduced by #5807, but should have been fixed by #5826 (merged just a couple hours ago). Can you try again with the latest master?

@NobbZ
Copy link
Contributor Author

NobbZ commented Dec 26, 2021

I've just updated and switched, seems indeed to work now.

@NobbZ NobbZ closed this as completed Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants