You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow specifying commands as packages without the attrset #216
Is your feature request related to a problem? Please describe.
When listing commands, most of my commands are just packages that don't need additional attributes. Having to repeat the package key is tedious. In my Nix config that ends up looking like
This can be done by changing the type for commands, which is currently listOf (submodule { options = commadOptions; }), to use either or coercedTo to accept a strOrPackage in addition to the submodule. coercedTo is probably better in that you wouldn't have to change any of the code that consumes it.
Describe alternatives you've considered
A library function could be provided instead that takes a list of packages and wraps each package in the appropriate attrset, but that seems unnecessarily awkward.
"category 1"=[{prefix="nix run .#";prefixes.a.b.yq-1="nix run ../#";packages={a.b={jq-1=["[package] jq description"pkgs.jq];yq-1=pkgs.yq-go;yq-2=pkgs.yq-go;};npm="nodePackages.npm";};}]
Activity
zimbatm commentedon Aug 31, 2022
Sounds good! (I mean, happy to get a PR for that)
deemp commentedon Jan 13, 2024
Something similar is implemented in #290.