-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
packages-config: refactor and simplification #113713
Conversation
I don't understand why this is needed at all. Cant we just say: There is the thing that Nix don't know about packages. Would it help to add such a concept? And even when there are good reasons why that don't work, we have all packages collected in It all feels like bad design. More complicated than needed, which causes errors like this over and over again. Do you mind explaining it shortly for my understanding? |
Nixpkgs is a tree, not a list; " There is currently no way of knowing whether an attr of pkgs is a package or a subset of packages. (..or a function, broken or even evaluable, see #107539) We need to tell Nix which attrs of pkgs are subsets and should be recursed into by setting |
Now simply inherits attrsets from super directly instead of mapping getAttr over a list of strings. Filtering isn't really needed as non-existent subsets should just be removed from this list when removing them from Nixpkgs (such an action warrants a tree-wide search which should come across this file). recurseIntoAttrs can simply be mapAttr'd now. Some subsets have been removed because they no longer exist. Sorted the list while I was at it.
cb60727
to
9d8ac38
Compare
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
Reminder: Please review! This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually. |
Result of |
I built
and compared it to latest master https://hydra.nixos.org/build/149921732#tabs-summary number of packages PR 113713:
master:
diff
https://gist.github.com/davidak/daca412ac5557e5fafa75726f241bbc9/edit So this PR does not break the previous behavior and also adds
cc @adisbladis |
|
so i think the packages should show up as see the documentation changes in https://github.com/NixOS/nixpkgs/pull/107152/files @adisbladis maybe you can clarify? |
I think we should merge this as-is until we find a better solution. I tried recursing into emacs.pkgs but nix-env doesn't seem to want to recurse into a drv which seems sensible. |
I agree. It looks cleaner (less code) and fixes an issue. I can't evaluate if the code is good, but i tested it and it does what it should. |
cc @adisbladis @davidak
Motivation for this change
Fixes #110348
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)