Merge pull request #32318 from FRidh/python-multiple-overrides

Python: support multiple overrides
This commit is contained in:
Frederik Rietdijk 2017-12-04 20:45:01 +01:00 committed by GitHub
commit ce269c971d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,10 +43,10 @@ let
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
in
if builtins.isAttrs ff then (ff // {
overridePythonAttrs = newArgs: makeOverridable f (overrideWith newArgs);
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
})
else if builtins.isFunction ff then {
overridePythonAttrs = newArgs: makeOverridable f (overrideWith newArgs);
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
__functor = self: ff;
}
else ff;