-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
RFC: poor man's nix-option via package argument names #13132
Copy link
Copy link
Closed
Labels
0.kind: questionRequests for a specific question to be answeredRequests for a specific question to be answered2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md9.needs: reporter feedbackThis issue needs the person who filed it to respondThis issue needs the person who filed it to respond
Metadata
Metadata
Assignees
Labels
0.kind: questionRequests for a specific question to be answeredRequests for a specific question to be answered2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md9.needs: reporter feedbackThis issue needs the person who filed it to respondThis issue needs the person who filed it to respond
Fields
Give feedbackNo fields configured for issues without a type.
Currently we don't have a way to discover available package options in nixpkgs. Usual way is to grep
all-packages.nixor to look into package directly. A discussion about the place of package flags together with some earlier thoughts inspired me to think of this: we don't have any typing nor we have a way to mark package arguments as "options" -- arguments are just, well, arguments. I.e. we don't have any way to distinguishpamthe dependency fromwithPamthe Boolean flag. ...Or do we? All flags do have something in common -- they have a name. We also have a loose naming policy of calling all package configuration flagswithFooorenableFoo. So, I propose this:nix-optiontool which would, given an overridable derivation (that is, output ofmakeOverridablefunction) would print all such options for it with current setting. Example:Notice that it would print current value, that is, if the package was overridden in
all-packages.nixor somewhere else the end result would be visible in the output.What do you think of this? It sounds somewhat hacky, and quite possibly there's some better way that I haven't thought of...
cc @zimbatm (because of discussion)