Merge pull request #19496 from Ericson2314/overridePackages
Make `overridePackages` extend rather than replace existing overrides
This commit is contained in:
@@ -69,9 +69,13 @@ rec {
|
||||
#
|
||||
# nix-repl> obj
|
||||
# { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; }
|
||||
makeExtensible = rattrs:
|
||||
makeExtensible = makeExtensibleWithCustomName "extend";
|
||||
|
||||
# Same as `makeExtensible` but the name of the extending attribute is
|
||||
# customized.
|
||||
makeExtensibleWithCustomName = extenderName: rattrs:
|
||||
fix' rattrs // {
|
||||
extend = f: makeExtensible (extends f rattrs);
|
||||
${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);
|
||||
};
|
||||
|
||||
# Flip the order of the arguments of a binary function.
|
||||
|
||||
Reference in New Issue
Block a user