aboutsummaryrefslogtreecommitdiff
path: root/src/nix/app.cc
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2022-11-14 15:00:05 +0100
committerThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2022-11-14 15:00:05 +0100
commit8b4352d79b488a82321254b7ab531ff977816361 (patch)
tree50e0dfb0d22b82d49b82aac0cd7b80f5482deada /src/nix/app.cc
parente7ed9ae0c711c4efd83756b16379549ecff52355 (diff)
parent302ddee749f1341895b3f18c7f430dfc13171985 (diff)
Merge remote-tracking branch 'nixos/master' into readFile-scan-references
Diffstat (limited to 'src/nix/app.cc')
-rw-r--r--src/nix/app.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/app.cc b/src/nix/app.cc
index 821964f86..48de8fb82 100644
--- a/src/nix/app.cc
+++ b/src/nix/app.cc
@@ -66,7 +66,9 @@ UnresolvedApp Installable::toApp(EvalState & state)
auto type = cursor->getAttr("type")->getString();
- std::string expected = !attrPath.empty() && state.symbols[attrPath[0]] == "apps" ? "app" : "derivation";
+ std::string expected = !attrPath.empty() &&
+ (state.symbols[attrPath[0]] == "apps" || state.symbols[attrPath[0]] == "defaultApp")
+ ? "app" : "derivation";
if (type != expected)
throw Error("attribute '%s' should have type '%s'", cursor->getAttrPathStr(), expected);