1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

* When obtaining derivations from Nix expressions, ignore all

expressions that cause an assertion failure (like `assert system ==
  "i686-linux"').  This allows all-packages.nix in Nixpkgs to be used
  on all platforms, even if some Nix expressions don't work on all
  platforms.

  Not sure if this is a good idea; it's a bit hacky.  In particular,
  due to laziness some derivations might appear in `nix-env -qa' but
  disappear in `nix-env -qas' or `nix-env -i'.

  Commit 5000!
This commit is contained in:
Eelco Dolstra 2006-03-08 16:03:58 +00:00
parent 9088dee9e2
commit 6dca5c9099
3 changed files with 98 additions and 70 deletions

View file

@ -383,7 +383,13 @@ Expr evalExpr(EvalState & state, Expr e)
/* Otherwise, evaluate and memoize. */
state.normalForms.set(e, state.blackHole);
nf = evalExpr2(state, e);
try {
nf = evalExpr2(state, e);
} catch (Error & err) {
debug("removing black hole");
state.normalForms.remove(e);
throw;
}
state.normalForms.set(e, nf);
return nf;
}