diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2021-02-02 19:50:03 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2021-02-02 19:53:19 -0600 |
commit | 3d1bbabe55eff6e67d91e0cbee781c2b756a2e92 (patch) | |
tree | 056e628ce9c5dcddb6ce0c9412971675f06c6983 | |
parent | 0e05cb6c619afca77f0162d8f2cc62d6618500de (diff) |
Use derivation output name from toDerivation
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.
-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 765d6866e..827f8be5a 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -249,7 +249,7 @@ struct CmdProfileInstall : InstallablesCommand, MixDefaultProfile attrPath, }; - pathsToBuild.push_back({drv.drvPath, StringSet{"out"}}); // FIXME + pathsToBuild.push_back({drv.drvPath, StringSet{drv.outputName}}); manifest.elements.emplace_back(std::move(element)); } else { |