-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
treewide: fail when nixpkgs.config
is set with explicit pkgs
, remove all nixpkgs.config
usages in in-tree modules
#257458
Conversation
…sed in externally This is a common footgun people hit often. Remove it.
A new X.org ABI is exceptionally unlikely at this point, and we can add an assertion if it ever happens.
I have no idea how to keep this working, but it feels wrong anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on my system, and everything still works. Although my system config doesn't make use of any of the places where this was previously defined, the diff looks good to me as well.
Maybe add a changelog entry? |
I did? |
Oops. Had it on the wrong branch. |
Just realized ofborg doesn't automatically request reviews from affected module maintainers, so I've done that manually. Please check up on your modules and tell me what I did wrong here! |
@@ -1,8 +1,6 @@ | |||
{ lib, stdenv, fetchurl, config }: | |||
{ lib, stdenv, fetchurl, config, dbfile ? config.locate.dbfile or "/var/cache/locatedb" }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh I don't know why we have this. Other packages also just hardcode paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I just create a PR dropping this entirely if @peterhoeg does not object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess someone wanted to put their locate database on some external storage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be accomplished with symlinks which removes some not really required complexity.
👍 for removing the vim option from GNOME. It was introduced to avoid GTK 2 variant but I would hope that is the default these days. If not, we should probably do that – it would be nice to get GTK 2 out of graphical installation ISO. |
This likely should've started as a warning; it's a rather broken and incomplete way to solve the problem, with no reasonable workarounds available to use while it's broken. Maybe it could assert that |
Why is it broken, and why is it an incomplete way to solve the problem? |
I mostly just personally disagree with the strict approach when not everyone necessarily has control over whether a possibly out-of-tree module has decided to set an option under config, though I guess you could The reason it's broken though is because not all uses of
Presumably these need to be changed to use |
Read accesses to those shouldn't break anything, as the option isn't removed, and the assertion won't be triggered by reading it. However, yes, those all should be changed to |
This was already the case before, in fact that's the entire rationale for this PR. |
`pkgs` may be passed in externally, in which case `config.nixpkgs.config` will not be set. Follow-up to NixOS#257458.
Oh I mean broken as in those config options are broken: if
At least one could |
That's actually a completely separate bug. |
(and using |
The locate change doesn't work at all:
(Config is just |
Description of changes
This gun has been pointed at too many feet now. Kill it.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)