31 lines
683 B
Nix
31 lines
683 B
Nix
{
|
|
modularFlake,
|
|
...
|
|
}:
|
|
let
|
|
ov = final: prev: { __canary = "meowmeow"; };
|
|
in
|
|
{
|
|
outputs = with modularFlake.defaultOutputs; [ overlays ];
|
|
modules = [
|
|
# fine to expect the system argument
|
|
({ system, ... }: {
|
|
config = {
|
|
# but not use it (note it is not used here)
|
|
overlays.a = builtins.seq (
|
|
assert 2 + 2 == 4;
|
|
null
|
|
) ov;
|
|
};
|
|
})
|
|
];
|
|
# should pass
|
|
fails = false;
|
|
check =
|
|
produced:
|
|
let
|
|
isFunction = val: builtins.isFunction val || (builtins.isAttrs val && val ? __functor);
|
|
ov1 = produced.overlays.a;
|
|
in
|
|
isFunction ov1 && isFunction (ov1 { }) && (ov1 { } { } == ov { } { });
|
|
}
|