1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

If a .drv cannot be parsed, show its path

Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
This commit is contained in:
Eelco Dolstra 2014-04-08 19:24:29 +02:00
parent e0a947cde6
commit dfa2f77d2e
7 changed files with 22 additions and 10 deletions

View file

@ -67,7 +67,7 @@ static void prim_import(EvalState & state, const Pos & pos, Value * * args, Valu
}
if (isStorePath(path) && store->isValidPath(path) && isDerivation(path)) {
Derivation drv = parseDerivation(readFile(path));
Derivation drv = readDerivation(path);
Value & w = *state.allocValue();
state.mkAttrs(w, 1 + drv.outputs.size());
mkString(*state.allocAttr(w, state.sDrvPath), path, singleton<PathSet>("=" + path));