diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-10-26 11:42:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 11:42:59 +0200 |
commit | bf2e6bcda3178feb30f346e3c2b93948e26745a0 (patch) | |
tree | bbf831ad6ca5c5665833187e6dbd2ab8cb3aa982 | |
parent | 899878f77a1b29b337aca409ec3f7a420e574a6a (diff) | |
parent | aff6d10934f046066ed68b0d54fa077e726008e5 (diff) |
Merge pull request #7223 from yorickvP/fix-defaultApp
nix run: fix "'defaultApp.x86_64-linux' should have type 'derivation'"
-rw-r--r-- | src/nix/app.cc | 4 |
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); |