Skip to content
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

release*: Support nixpkgsArgs for all release-*.nix files #97790

Merged
merged 1 commit into from Sep 16, 2020

Conversation

infinisil
Copy link
Member

Motivation for this change

This is a bit dirty because there's no easy way to propagate these function arguments while still allowing --arg from the command line. But at least you can now pass nixpkgsArgs for release-small.nix and co.

Things done
  • Checked that the modified files still evaluate with nix-instantiate <file> -A <TAB>

This is a bit dirty because there's no easy way to propagate these
function arguments while still allowing --arg from the command line
@grahamc
Copy link
Member

grahamc commented Sep 11, 2020

It would be neat if this function signature and its defaults could be written down in one place, but otherwise nice.

@infinisil
Copy link
Member Author

Yeah, that's a bit unfortunate, because we can't remove the nixpkgsArgs argument from these functions, because otherwise you can't pass --arg nixpkgsArgs .... But we also can't remove the default because then passing it isn't optional. And we also can't change the default to e.g. null because then that would be propagated to release-lib.nix, but that's not a valid value. And we also can't just use @args to capture all arguments and pass them on because then --arg doesn't work again. I think the only thing that might work is some logic to detect if the parameters are passed, and only then propagate them. But that's probably more code than just copy pasting this one default around. Sooo yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants