-
Notifications
You must be signed in to change notification settings - Fork 249
[package outputs] generate buildInputs for package-outputs in flake #1721
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
Merged
Conversation
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
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
0e3f58f
to
252f808
Compare
373895c
to
4d73d2c
Compare
252f808
to
7677c6e
Compare
mikeland73
reviewed
Jan 12, 2024
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.
LGTM, will let @gcurtis take a look as well.
7677c6e
to
fc6f68a
Compare
This was referenced Jan 12, 2024
062cc7f
to
93ef16e
Compare
fc6f68a
to
89f58f9
Compare
93ef16e
to
9fe6bea
Compare
89f58f9
to
4dad679
Compare
9fe6bea
to
b0dd286
Compare
4dad679
to
18c071e
Compare
gcurtis
approved these changes
Jan 16, 2024
18c071e
to
afd3f9e
Compare
336ce68
to
1f0aead
Compare
afd3f9e
to
c06ca5b
Compare
1f0aead
to
62f5cb2
Compare
c06ca5b
to
1f3c4f3
Compare
62f5cb2
to
7fc9961
Compare
1f3c4f3
to
687ed4e
Compare
687ed4e
to
02ef19d
Compare
02ef19d
to
8da2bd0
Compare
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.
Summary
This PR reads the
outputs
field from the Config for a package.For packages with non-default outputs in the config, we specify:
flakeInput.buildInputs()
that are specified in the generated flake's devshell.buildInputsInstead, we generate a
symlinkJoin
derivation of the form:This
prometheus-combined
derivation is useful so that when we derive the nix-profile from the flake's buildInputs as in #1692, it is treated as a single package. Without this, we could inline each output as a distinct buildInput in the flake's devshell, but then the nix profile would treat each output as its own package.How was it tested?
Added testscript unit-test. Also, ran the same steps inside the testscript manually.
setup:
then the generated flake is:
this leads to
$buildInputs
in adevbox shell
to be:where the
prometheus-combined
derivation has thecli
andout
outputs combined: