-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
nixpkgs implicit global configuration file is an hidden source of non reproducibility #62513
Comments
You can always set |
Yes, you are right, it is possible to override However that's still a problem of discoverability and safe defaults. By default it is non hermetic and it becomes hermetic if the user is aware of the problem and think about overriding the default behavior. |
The nix flakes branch changes the |
The same is true for |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
It would be nice to have a documented way of getting a pure evaluation, even when not using flakes. It looks like flakes currently does execute This could just be importing |
I marked this as stale due to inactivity. → More info |
Issue description
Implicitly, when we import a nixpkgs clone, using
nixpkgs = import (tarballOfNixpkgs) {}
and without providing aconfig
oroverlays
attribute,nixpkgs
implicitly loads a global configuration file. See:nixpkgs/pkgs/top-level/impure.nix
Lines 29 to 73 in fc27772
This can lead to hermeticity issues if the global configuration contains
packageOverrides
or some other settings which have an impact on the final build.This behavior is enabled by default in
nixpkgs
.I understand the reasons to get it by default when using the "global"
<nixpkgs>
package, for example when usingnix-env -i
ornix-shell
in a directory withoutdefault.nix
.Could it be possible to insert a new attribute to nixpkgs, such as
useGlobalConfiguration
, which will default tofalse
and will be overrode totrue
by tools such asnix-env
ornix-shell
in the right context?The text was updated successfully, but these errors were encountered: