-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: add --apply
flag
#332
base: main
Are you sure you want to change the base?
Conversation
@mergify rebase |
✅ Branch has been successfully rebased |
That crash looks legit. Do you have issues reproducing this locally? |
I don't remember that failing |
Allow applying every eval'ed drv to a provided nix expression to evaluate arbitrary fields. EXAMPLE ``` % ./result/bin/nix-eval-jobs --flake github:NixOS/patchelf#hydraJobs \ --apply \ 'drv: { version = if drv ? version then drv.version else null; }' warning: `--gc-roots-dir' not specified {"attr":"coverage","attrPath":["coverage"],"version":null} {"attr":"patchelf-win32","attrPath":["patchelf-win32"],"version":"0.18.0"} {"attr":"patchelf-win64","attrPath":["patchelf-win64"],"version":"0.18.0"} {"attr":"release","attrPath":["release"],"version":null} {"attr":"tarball","attrPath":["tarball"],"version":"0.18.0"} ```
Sorry for letting this sit so long! I've rebased the PR onto main again and fixed the test. |
@@ -203,6 +205,26 @@ void worker( | |||
} | |||
maybeConstituents = | |||
Constituents(constituents, namedConstituents); | |||
} else if (args.applyExpr != "") { |
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.
Do we only run apply if it's not a derivation? Why not always do that?
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.
Ah. this is about constituents
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.
@Ma27 do we want to have apply also working if we do have constituents?
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 don't see any reason against it.
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 have no issue with having it aside of constituents, what do you think should the precedence be?
i.e. if --apply
produces a constituents
attribute, should that be overridden by constituents
, or should we side step that question and put the result of apply
into a separate attribute?
Allow applying every eval'ed drv to a provided nix expression to evaluate arbitrary fields.
EXAMPLE