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

Allow selecting derivation outputs #6449

Merged
merged 2 commits into from
May 3, 2022
Merged

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Apr 26, 2022

This allows selecting the outputs of a derivation nix should operate on using the syntax installable^outputs, e.g. nixpkgs#glibc^dev,static or nixpkgs#glibc^*. By default, nix will use the outputs specified by the derivation's meta.outputsToInstall attribute if it exists, or all outputs otherwise.

Depends on #6426.

@edolstra edolstra marked this pull request as ready for review April 28, 2022 08:36
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-29/18903/1

@edolstra
Copy link
Member Author

edolstra commented May 2, 2022

I've changed the ! character to ^ to make it easier on shell users.

@dpulls
Copy link

dpulls bot commented May 3, 2022

🎉 All dependencies have been resolved !

E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
@edolstra edolstra merged commit 9489b4b into NixOS:master May 3, 2022
@Ericson2314
Copy link
Member

@edolstra you still did not address and instead many of the issues in the other thread, once again.

  • nixpkgs#glibc.dev not working is terrible UI

  • Syntax is subtly inconsistent/ambiguous given accepted RFC 92

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/recent-nix-change-worthy-of-greater-attention/18972/1

@roberth
Copy link
Member

roberth commented Jun 3, 2022

It would be useful for this to operate at the expression level, rather than the store level, so that packages can be split across derivations. Here's a use case where it breaks NixOS/nixpkgs#175785 (comment)

Another use case is for packages that use heavy tooling in their docs output. Splitting those docs out into a separate derivation reduces the build closure size.

See also #6507

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

Successfully merging this pull request may close these issues.

4 participants