cli: Add --nix-option to allow passing arbitrary nix options #126
Merged
zhaofengli merged 3 commits intozhaofengli:mainfrom Nov 14, 2022
Merged
cli: Add --nix-option to allow passing arbitrary nix options #126zhaofengli merged 3 commits intozhaofengli:mainfrom
zhaofengli merged 3 commits intozhaofengli:mainfrom
Conversation
This helps differentiate in the code Nix's `--option` and other CLI flags (previously referred to as options).
17d2965 to
90c88dd
Compare
zhaofengli
approved these changes
Nov 13, 2022
Owner
zhaofengli
left a comment
There was a problem hiding this comment.
Looks good to me, thanks! Just ran cargo fmt on the first commit and waiting for the CI to pass.
This was referenced Apr 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I use this to pass
extra-builtins-file, but thought it would be more useful to add a generic flag.An other solution would be forwarding any extra args to nix:
colmena build --verbose -- --option name value.If that sounds better I can do that!
I also renamed
NixOptionstoNixFlagsto help differentiate in the code between Nix's--optionand other CLIflags (previously referred to as options). This is a separate commit and can be squashed/dropped/left as is if you want.
I could also rename the other
*Optionstypes if you'd like.