mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
makeOverridablePythonPackage: preserve function arguments
This commit is contained in:
parent
6a8b6b8f72
commit
b3e2c15000
@ -13,7 +13,7 @@ let
|
|||||||
|
|
||||||
# Derivations built with `buildPythonPackage` can already be overridden with `override`, `overrideAttrs`, and `overrideDerivation`.
|
# Derivations built with `buildPythonPackage` can already be overridden with `override`, `overrideAttrs`, and `overrideDerivation`.
|
||||||
# This function introduces `overridePythonAttrs` and it overrides the call to `buildPythonPackage`.
|
# This function introduces `overridePythonAttrs` and it overrides the call to `buildPythonPackage`.
|
||||||
makeOverridablePythonPackage = f: origArgs:
|
makeOverridablePythonPackage = f: lib.mirrorFunctionArgs f (origArgs:
|
||||||
let
|
let
|
||||||
args = lib.fix (lib.extends
|
args = lib.fix (lib.extends
|
||||||
(_: previousAttrs: {
|
(_: previousAttrs: {
|
||||||
@ -30,7 +30,7 @@ let
|
|||||||
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
|
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
|
||||||
__functor = self: result;
|
__functor = self: result;
|
||||||
}
|
}
|
||||||
else result;
|
else result);
|
||||||
|
|
||||||
mkPythonDerivation = if python.isPy3k then
|
mkPythonDerivation = if python.isPy3k then
|
||||||
./mk-python-derivation.nix
|
./mk-python-derivation.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user