mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
nix run: fix "'defaultApp.x86_64-linux' should have type 'derivation'"
This commit is contained in:
parent
899878f77a
commit
aff6d10934
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue