-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
lib
: Working with nested attrsets of packages
#202517
base: master
Are you sure you want to change the base?
Conversation
lib
: Working with nested attrsetslib
: Working with nested attrsets of packages
Why implement a bad function? Basically because the _idea_ exists and we can't kill an idea. The best we can do is catch anyone who tries to use it, and inform them.
(listOf str -> str) -> | ||
(listOf str -> attrs -> bool) -> | ||
attrs -> | ||
attrs |
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.
(listOf str -> str) -> | |
(listOf str -> attrs -> bool) -> | |
attrs -> | |
attrs | |
(listOf str -> str) -> # joinPath | |
(listOf str -> attrs -> bool) -> # upTo | |
attrs -> | |
attrs |
The `recurseForDerivations` attribute gets removed from the returned tree, | ||
as it does not contain a derivation, or any information that can't be | ||
recovered from `(attrs.type or null) == "derivation"`. | ||
*/ |
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.
*/ | |
This function probably does not interact well with splicing, so if you are using it on an attrset which is exposed in `top-level.nix`, please verify that cross-compilation still works after doing so. | |
*/ |
NOTE: This function evaluates too much and should usually be avoided. | ||
|
||
Traverses a potentially nested attribute set of derivations and | ||
non-derivations in approximately the way `nix-build` would. |
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.
non-derivations in approximately the way `nix-build` would. | |
non-derivations in approximately the way `nix-build` would, removing all non-derivation leaves. |
`joinDerivationsLeafStrictSep <sep> <v>` turns the tree of derivations `<v>` | ||
into an attribute set of derivations. |
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.
`joinDerivationsLeafStrictSep <sep> <v>` turns the tree of derivations `<v>` | |
into an attribute set of derivations. | |
`joinDerivationsLeafStrictSep <sep> <v>` deletes all non-derivation leaves from the nested attrset `<v>` and flattens the result. |
Description of changes
Functions for
TODO
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/
)nixos/doc/manual/md-to-db.sh
to update generated release notes