aboutsummaryrefslogtreecommitdiff
path: root/src/nix/profile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/profile.cc')
-rw-r--r--src/nix/profile.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix/profile.cc b/src/nix/profile.cc
index 7dcc0b6d4..be002519a 100644
--- a/src/nix/profile.cc
+++ b/src/nix/profile.cc
@@ -178,7 +178,9 @@ struct CmdProfileInstall : InstallablesCommand, MixDefaultProfile
auto [attrPath, resolvedRef, drv] = installable2->toDerivation();
ProfileElement element;
- element.storePaths = {drv.outPath}; // FIXME
+ if (!drv.outPath)
+ throw UnimplementedError("CA derivations are not yet supported by 'nix profile'");
+ element.storePaths = {*drv.outPath}; // FIXME
element.source = ProfileElementSource{
installable2->flakeRef,
resolvedRef,
@@ -189,7 +191,7 @@ struct CmdProfileInstall : InstallablesCommand, MixDefaultProfile
manifest.elements.emplace_back(std::move(element));
} else
- throw Error("'nix profile install' does not support argument '%s'", installable->what());
+ throw UnimplementedError("'nix profile install' does not support argument '%s'", installable->what());
}
store->buildPaths(pathsToBuild);
@@ -347,7 +349,9 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
printInfo("upgrading '%s' from flake '%s' to '%s'",
element.source->attrPath, element.source->resolvedRef, resolvedRef);
- element.storePaths = {drv.outPath}; // FIXME
+ if (!drv.outPath)
+ throw UnimplementedError("CA derivations are not yet supported by 'nix profile'");
+ element.storePaths = {*drv.outPath}; // FIXME
element.source = ProfileElementSource{
installable.flakeRef,
resolvedRef,