3
0
Fork 0
forked from mirrors/nixpkgs

Python: support multiple overrides

Fixes https://github.com/NixOS/nixpkgs/issues/32263
This commit is contained in:
Frederik Rietdijk 2017-12-04 20:09:30 +01:00
parent cb6065f0c9
commit 78291a920f

View file

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