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

installables: resolve derivation outputs #2577

Closed
wants to merge 1 commit into from

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Dec 12, 2018

When converting a drv path to an installable the buildables would
contain {"out", "/nix/store/<path>.drv"} as outputs instead of the
actual outputs from the derivation.

This makes sure the result symblinks created nix build point to the
outputs instead of the drv file that was built.

When converting a drv path to an installable the buildables would
contain {"out", "/nix/store/<path>.drv"} as outputs instead of the
actual outputs from the derivation.

This makes sure the result symblinks created `nix build` point to the
outputs instead of the drv file that was built.
return {{isDerivation(storePath) ? storePath : "", {{"out", storePath}}}};
if (isDerivation(storePath)) {
std::map<std::string, Path> outputs;
auto drv = readDerivation(storePath);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the most optimal way to query the outputs, but it works for diverted/remote stores from what I can tell.

@LnL7
Copy link
Member Author

LnL7 commented Dec 13, 2018

This probably has unintended side effects. I just noticed toStorePaths also uses this, so every command that takes installables will go through it.

@LnL7 LnL7 closed this Mar 21, 2019
@LnL7 LnL7 deleted the installables-drv-outputs branch March 21, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant