mirror of
https://github.com/nix-community/flakelight.git
synced 2024-11-25 08:53:15 +01:00
Fix evaluation of packages.default not using mkDerivation
The mock pkgs set passed `{}` as the value for unknown args; if a package def tried to evaluate one, this can raise an error that can't be caught. Replacing the default value with `throw ""` enables bailing out if one of the fake args is accessed.
This commit is contained in:
parent
589ee5ba7a
commit
11e65b623d
@ -12,7 +12,7 @@ let
|
||||
let
|
||||
f = if lib.isFunction fn then fn else import fn;
|
||||
fargs = lib.functionArgs f;
|
||||
mock = lib.mapAttrs (_: _: { }) (lib.filterAttrs (_: v: !v) fargs);
|
||||
mock = lib.mapAttrs (_: _: throw "") (lib.filterAttrs (_: v: !v) fargs);
|
||||
in
|
||||
f (mock // builtins.intersectAttrs fargs autoArgs // args);
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user