Skip to content

Use derivation output name from toDerivation#4778

Merged
edolstra merged 1 commit intoNixOS:masterfrom
matthewbauer:fix-nix-profile-install-first-output-2
May 6, 2021
Merged

Use derivation output name from toDerivation#4778
edolstra merged 1 commit intoNixOS:masterfrom
matthewbauer:fix-nix-profile-install-first-output-2

Conversation

@matthewbauer
Copy link
Member

This was previously done in #4515 but
got clobbered away in #4594.

/cc @Ericson2314 @edolstra


This fixes an issue where derivations with a primary output that is
not "out" would fail with:

$ nix profile install nixpkgs#sqlite
error: opening directory '/nix/store/2a2ydlgyydly5czcc8lg12n6qqkfz863-sqlite-3.34.1-bin': No such file or directory

This happens because while derivations produce every output when
built, you might not have them if you didn't build the derivation
yourself (for instance, the store path was fetch from a binary cache).
This uses outputName provided from DerivationInfo which appears to
match the first output of the derivation.

This was previously done in NixOS#4515 but
got clobbered away in NixOS#4594.

--------------------------------------------------------------------------------

This fixes an issue where derivations with a primary output that is
not "out" would fail with:

$ nix profile install nixpkgs#sqlite
error: opening directory '/nix/store/2a2ydlgyydly5czcc8lg12n6qqkfz863-sqlite-3.34.1-bin': No such file or directory

This happens because while derivations produce every output when
built, you might not have them if you didn't build the derivation
yourself (for instance, the store path was fetch from a binary cache).
This uses outputName provided from DerivationInfo which appears to
match the first output of the derivation.
@edolstra edolstra merged commit db6ab75 into NixOS:master May 6, 2021
@Ericson2314
Copy link
Member

Thanks!

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.

3 participants