Conversation
A simple preparation for plans discussed in - NixOS#376033 Crucially, without these changes, the identifier `lib` has too many meanings and therefore doesn't mean anything, making it unmaintainable.
This will make future changes to the `lib` attribute easier to reason about.
|
Alternative idea: maybe recognizing
(or |
|
I think the alternative idea sounds maybe better. It's certainly really confusing that nixpkgs lib just has some random nixos bits overlaid on top of it but only when using it from a flake. Without those bits it's pretty clear what lib is in nixpkgs. Part of why this is so weird is precisely because of the rigid flake output schema and the flake output schema requiring that you call the library stuff lib which is confusable with nixpkgs lib, the thing that everyone knows about. So it seems to me that the less confusing solution is to remove the namespace collision, perhaps by making lib in the flake just the normal nixpkgs lib and moving the nixos bits into a different attribute name that violates the flake spec, which, whatever, loads of violations of that thing around; I grant I have little care for strictly following the flake output schema given the numerous other design flaws. Alternatively they could both be moved into a libraries output and thus break more people. Having the libraries output (with a lib subattribute) be called lib is confusing because most people see nixpkgs.lib and they think pkgs.lib, not a secret other thing called lib. There's multiple things called lib in nixpkgs to be sure, like haskell.lib, but that one's called hlib conventionally and thus isn't particularly confusing. |
Best reviewed commit-by-commit due to reformatting.
A simple preparation for plans discussed in
Crucially, without these changes, the identifier
libhas too manymeanings and therefore doesn't mean anything, making it unmaintainable.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.