diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2021-05-05 16:33:05 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2021-05-05 16:33:05 -0500 |
commit | 1e3a9033b7010c3b49c61c05ec93ba1ba6a61c97 (patch) | |
tree | d963b3383a9ebc669075e6d933ef31e06a66fe12 /src | |
parent | fe3a10a9b2c61ba19b24da4c93c4abc9e7583f3d (diff) |
Use derivation output name from toDerivation
This was previously done in https://github.com/NixOS/nix/pull/4515 but
got clobbered away in https://github.com/NixOS/nix/pull/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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/profile.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/profile.cc b/src/nix/profile.cc index 667904cd2..e511c4c3e 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -426,7 +426,7 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf attrPath, }; - pathsToBuild.push_back(DerivedPath::Built{drv.drvPath, {"out"}}); // FIXME + pathsToBuild.push_back(DerivedPath::Built{drv.drvPath, {drv.outputName}}); } } |