lib: make extender available on self-references

This commit is contained in:
Chris Hodapp 2023-01-15 10:56:07 -08:00
parent a518c77148
commit 06f0e49dc6

View file

@ -107,7 +107,7 @@ rec {
# Same as `makeExtensible` but the name of the extending attribute is
# customized.
makeExtensibleWithCustomName = extenderName: rattrs:
fix' rattrs // {
fix' (self: (rattrs self) // {
${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);
};
});
}