-
Notifications
You must be signed in to change notification settings - Fork 52
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
idea: Group image actions under do
#117
Comments
I also like this idea. This goes a step further than my initial implementation ( Do you know if this pattern is used elsewhere in the Nix community? |
I don’t know of other similar patterns in the nix community. |
I asked in a chat and there are some concerns using passthrough methods of derivations. The evaluation time accessing these methods apparently is significant (not verified). in a flake module it is probably wiser to create a “do”sibling attribute next to the derivation of the image. For your API, you could do something similar but it would be a breaking change and in some contexts not feel as convenient, I think, |
If you keep the pass through methods, collecting them under a |
I really like the idea of defining "convenience actions" on an image. Right now, though, they are mixed on the same level as unrelated attributes of a derivation.
n2c.aarch64-darwin.images.bash.result
is an image produced withbuildImage
:I propose to bundle the actions under a
passthrough
sub attributedo
, maybe further subdivided into categories:and then
Compatibility: I'd keep aliases at the old locations for now. Potentially with a deprecation warning.
What do you think?
The text was updated successfully, but these errors were encountered: