-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Low level <drvPath>^<outputName>
installable syntax to match existing <highLevelInstallable>^<outputNames>
syntax
#4543
Low level <drvPath>^<outputName>
installable syntax to match existing <highLevelInstallable>^<outputNames>
syntax
#4543
Conversation
13ef605
to
e020807
Compare
I think CmdProfileInstall also needs to change to reflect this: https://github.com/NixOS/nix/blob/master/src/nix/profile.cc#L267-L270 so only outputs listed in BuildableFromDrv "outputs" are installed. |
I'm not sure what this brings implementation-wise compared to #4494 (except obviously for the doc and test which are obviously missing in the latter). In particular it seems to me that having an extra |
@regnat I'm afraid I didn't even realize you had a PR this did this! |
@regnat I think the simpler and pure (no DB access) |
093a8ee
to
8e2206e
Compare
03729eb
to
15d9d45
Compare
15d9d45
to
8d36d96
Compare
🎉 All dependencies have been resolved ! |
cece11c
to
57e90af
Compare
Being conservative and only doing a single output name for now.
57e90af
to
8499f32
Compare
This doesn't solve the shell 'escape needed' problems. I'm unsure if
(e.g. similiar to #4686, but with |
Yeah we didn't settle on a surface syntax yet. |
Currently, this syntax is (already) used with CA-drvs, which leads to problems with |
Unless I missed something, these have only been created because of a now-closed bug (#5176), and it only concerns lockfiles. Is there more of these? |
Yeah this has nothing to do with that one, which @regnat fixed. This is just making an internal syntax exposed to the user. In this case, we in fact rely on |
I should also mention that |
To clarify, this is existing syntax that happens to not function with installables, but would otherwise be allowed. Would this leak into things like profiles or machine-readable output? |
This is preexing syntax for some legacy commands (e.g. This specific change won't leak anywhere, this is just changing the CLI syntax for installables. In way, the leaking behind the scenes is already done! --- thanks to those This, or something like this, is part of RFC 92, so we should figure out what the experimental feature is called and get this merged. I had been waiting to hopefully add some more tests firsts for the status quo first, but if that is controversial we should just go ahead with this and the other parts of RFC 92. |
e7e1fe4
to
e5c42bb
Compare
<drvPath>^<outputName>
<drvPath>^<outputName>
installable syntax to match existing <highLevelInstallable>^<outputNames>
syntax
Discussed in Nix team meeting 2022-11-28:
-> to review |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2022-11-28-nix-team-meeting-minutes-12/23730/1 |
req(storePath.isDerivation() | ||
? (DerivedPath) DerivedPath::Built { | ||
.drvPath = std::move(storePath), | ||
.outputs = {}, |
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.
Note it previously read the derivation and returned all its output names explicitly here, but that didn't work e.g. when the drv file itself needs to be downloaded and so we cannot yet read it.
Thanks! Co-authored-by: Valentin Gagarin <[email protected]>
…ms/nix into indexed-store-path-outputs
OK @edolstra, I think all review from today is now addressed! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2022-12-12-nix-team-meeting-minutes-16/24119/1 |
Hey I know this is the bikesheddiest of bikesheds, but I just realized we could have used
... since Nix strictly forbids a top-level store path which isn't a derivation from having the suffix Who cares, you ask? Maybe it's just me, but the Like I said, bikesheds. Glad I got that out of my system. We now return you to your regularly-scheduled software development... |
@amjoseph-nixpkgs I think some command allow you specify a store path with trailing path relative to it? It could get a git confusing in that case. On a conceptual level I want |
#6426 added
^<output-names>
to high level installables (flakes ones and attribute paths). This adds it to our low level installable --- a plain store path --- to match.I think this is important because it greatly helps "complete" the expressive power of Nix's low-level "plumbing" commands, and doing that (and eventually stabilizing them) is a good cost / benefit win.
In addition:
One ingredient for #7261, but should be good even if we reject that issue.
Also important for RFC 92 (tracking issue #6316).