diff --git a/lib/customisation.nix b/lib/customisation.nix index fb4d4da7623f..3b7f68580053 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -151,8 +151,12 @@ rec { makeOverridable = f: let + fArgs = functionArgs f; # Creates a functor with the same arguments as f - mirrorArgs = mirrorFunctionArgs f; + mirrorArgs = g: { + __functor = self: g; + __functionArgs = fArgs; + }; f' = origArgs: