mirror of
https://github.com/nix-community/flakelight.git
synced 2025-06-21 01:57:57 +02: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
|
let
|
||||||
f = if lib.isFunction fn then fn else import fn;
|
f = if lib.isFunction fn then fn else import fn;
|
||||||
fargs = lib.functionArgs f;
|
fargs = lib.functionArgs f;
|
||||||
mock = lib.mapAttrs (_: _: { }) (lib.filterAttrs (_: v: !v) fargs);
|
mock = lib.mapAttrs (_: _: throw "") (lib.filterAttrs (_: v: !v) fargs);
|
||||||
in
|
in
|
||||||
f (mock // builtins.intersectAttrs fargs autoArgs // args);
|
f (mock // builtins.intersectAttrs fargs autoArgs // args);
|
||||||
in
|
in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user