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

NIX_PATH not honored #324

Open
zhaofengli opened this issue Sep 1, 2024 · 5 comments
Open

NIX_PATH not honored #324

zhaofengli opened this issue Sep 1, 2024 · 5 comments

Comments

@zhaofengli
Copy link
Contributor

On 8802412, NIX_PATH does not appear to have an effect:

$ NIX_PATH=meow=/dev/null ./build/src/nix-eval-jobs -E 'toString <meow>'
...
              error: file 'meow' was not found in the Nix search path (add it using $NIX_PATH or -I)
@Mic92
Copy link
Member

Mic92 commented Sep 2, 2024

This is a "feature" that inherited from the original hydra-eval-jobs:

unsetenv("NIX_PATH");

@zhaofengli
Copy link
Contributor Author

zhaofengli commented Sep 2, 2024

Oh wow, my grep-foo failed and it worked before. CI relying on <nixpkgs> only started to fail in Colmena since the last bump.

I guess NIX_PATH previously working should be considered unintentional despite the error message?

@Mic92
Copy link
Member

Mic92 commented Sep 2, 2024

Maybe NIX_PATH was interpreted before that line of code?
What should still work is nix-eval-jobs -I nixpkgs= etc?
Not sure what the best course of action here is. I would like to use nix-eval-jobs in hydra again at some point.

@zhaofengli
Copy link
Contributor Author

zhaofengli commented Sep 2, 2024

Yeah, it was interpreted when constructing the global evalSettings. IMO nix-eval-jobs should act as "normal Nix" and accept the variable and let the user (e.g., Hydra) clear it as needed. The user can opt to use flakes/pure-eval/restrict-eval if they care about hermeticity.

@Mic92
Copy link
Member

Mic92 commented Sep 3, 2024

Feel free to make a pull request removing unsetenv and updating a documentation on how to get hermetic evaluation.

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

No branches or pull requests

2 participants