-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add replace xyzBuilder with unified 'outputsBuilder' #59
Conversation
(optionalAttrs (args ? ${builder}) | ||
{ ${output} = args.${builder} pkgs; }); | ||
(optionalAttrs (systemOutputs ? ${output}) | ||
{ ${output} = systemOutputs.${output}; }); | ||
|
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.
I think this would be better done with a mapAttrs
. That way its future proofed if more system-spaced outputs ever get added.
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.
also code is a bit simpler, mkOutput
is no longer necessary
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.
Yes, I agree mapAttrs would be better option but we are dealing with multiple restrictions:
nix flake show
should not error - we cant output empty attrsets- outputs must be merged - if we just go with mapAttrs while keeping in mind the first point - not all attrs will get merged.
And yeah, I guess I could go over the names and just generate attrset out of that. Probably will change that but I really should go and get some sleep now :D
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.
sounds good, I think it could probably be used in the future once we remove the deprecated arguments. For now this works well.
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.
Not going to do the attrs from list thingy. At least for time being - could not find a solution that I'd be happy with. Its other solutions are more complex and use around the same amount of lines
Also, not sure what happened to GitHub actions - but it does not show output for some reason 🤔 Anyways, there are two checks - one uses What needs to be tackled before merge:
If you guys wish to work on it - feel free to just push changes to this branch. But I'm pretty sure that ill find some time tomorrow to fix this up On a totally unrelated note - @blaggacao thank you for talking me into adding devshell <3 It is so dam convenient |
Nice! |
No description provided.