If I lib.makeOverridable
a function that already returns something overridable, I lose the ability to override the returned thing, which sometimes can be really convenient.
Can we retain the ability to override at all levels somehow? So maybe change makeOverridable
to something like this:
if isAttrs result then
result // {
inner = result.override;
override = overrideArgs;
overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv);
${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
overrideResult (x: x.overrideAttrs fdrv);
}
So I can use thing.override.inner { ... }
?