-
-
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
fix NIX_PATH
for real
#11079
fix NIX_PATH
for real
#11079
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-07-17-nix-team-meeting-minutes-162/49255/1 |
- test restricted evaluation - test precedence for setting the search path
d41543a
to
3b23fe6
Compare
This ensures that the overriding happens even when no config file exists. This can happen when running Nix in a bare sandbox, for example.
NIX_CONF_DIR is not set when running the tests on NixOS.
e6d06fc
to
82ec493
Compare
github flakes VM test is flaky; second occurrence I know of: https://github.com/NixOS/nix/actions/runs/10076791399/job/27857897291?pr=11079 I'm rerunning it. |
I am not sure in which version the bug first appeared but maybe we can backport this to 2.23 at least? |
Code has moved around a bit since 2.23, so git won't be of much help, but it's feasible. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-07-24-nix-team-meeting-minutes-164/49811/1 |
Since Nix 2.24, NIX_PATH overrides any setting defined in nix.conf[1]. This renders the 'extra-nix-path' option set by the installer[2] ineffective. The problem only affects nix-darwin. In NixOS, NIX_PATH is defaulted to the same value as the one set by the installer[3]. [1]: NixOS/nix#11079 [2]: https://github.com/DeterminateSystems/nix/blob/v2.24.6/flake.nix#L123 [3]: https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/misc/nixpkgs-flake.nix#L96-L102
with @roberth
Motivation
closes #9574
Context
Based on #7871 and #8902
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.