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
[WIP] Deprecate packageOverrides #43560
Conversation
Currently WIP because I haven't finished going through all of the mentions of packageOverrides in the manual. |
packageOverrides = pkgs: { | ||
myEclipse = with pkgs.eclipses; eclipseWithPlugins { | ||
self: super: { | ||
myEclipse = with self.eclipses; eclipseWithPlugins { |
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.
nit: super.eclispeWithPlugins
.
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.
eclipseWithPlugins
is in eclipses
, not in nixpkgs top level. Should it be super.eclipses.eclipseWithPlugins
, or left as is?
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.
Yes, it should come from super
.
packageOverrides = pkgs: with pkgs; { | ||
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ | ||
self: super: { | ||
myEmacs = self.emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ |
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.
nit: super.emacsWithPackages
Unless supporting Also, we really shouldn't spam people's consoles with huge walls of text via |
(disadvantages of packageOverrides copied from my original description in #43266)
To elaborate on the former, we constantly have new users coming in and being confused by As far as the warning is concerned: so move what I wrote into a subsection of the overlays chapter and link to that in the warning? Personally I'd prefer not to go through the layer of indirection of opening my browser, but it's not a hill I'll die on. As for whether the warning should be there at all, I'd consider it polite to let users know (but keep them working) in 18.09 before removing it in 19.03 or something like that. |
Simplifying the problem we are working with while moving towards something which has more feature with a simpler model sounds like a good goal. Deprecating a feature for X versions before removing it is a good way to know what are the problems, and improve the documentation to migrate from the old scheme to the new one. If we do not allow to change existing features, then we are left with only adding complexity. This can only result in tools which are harder to understand and to use properly. |
Yes this is good, and |
One valid objection to overlays in general, voiced by @grahamc on IRC, summarised by me (see https://logs.nix.samueldr.com/nixos-chat/2018-07-16#1380939 for what he wrote himself): Overlays invariably work in the scope of all of nixpkgs, and can thus have wide-reaching, potentially undesirable effects. In addition, the composability encourages mixing and matching overlays from arbitrary sources, while an individually curated Personally I think that in practice this isn't much of an issue — poor-quality overlays aren't too likely to become popular I suspect, and malicious individual packages can do just as much damage as a malicious overlay. |
Are there any updates on this pull request, please? |
Probably needs an RFC. |
Thank you for your contributions.
|
I guess I still need to write that RFC :) |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/why-are-overlays-better-than-pkgoverrides/7052/12 |
Documentation is actually the biggest problem here. If we update that, newcomers will probably never learn about |
I was going to update all the documentation in this PR, but given Eelco's opposition to this I didn't want to invest the effort for nothing. Maybe One Day™ I'll write an RFC or something. |
But a warning is not breaking any code? Everyone would get time to adopt, right?
I'm not sure if I followed the discussion correctly but I don't understand why a proper proposal of
is not progressing?
As kind of a new nix user I would be interested in more simplicity and streamlining to efficient methods like overlays. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
#43266
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)