mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
buildPython*: bring back buildPython*.override
Fix `makeOverridablePythonPackage` in python-package-base.nix
and unshadow `buildPython*.override`.
This makes it possible to override the dependencies of buildPython*.
E.g., `buildPythonPackage.override { unzip = unzip-custom; }`
returns a derived version of `buildPythonPackage` with
the `unzip` package overridden with `unzip-custom`.
This commit is contained in:
@@ -38,7 +38,12 @@ let
|
||||
}
|
||||
else
|
||||
result
|
||||
);
|
||||
)
|
||||
// lib.optionalAttrs (f ? override) {
|
||||
# Support overriding `f` itself, e.g. `buildPythonPackage.override { }`.
|
||||
# Ensure `makeOverridablePythonPackage` is applied to the result.
|
||||
override = lib.mirrorFunctionArgs f.override (fdrv: makeOverridablePythonPackage (f.override fdrv));
|
||||
};
|
||||
|
||||
mkPythonDerivation =
|
||||
if python.isPy3k then ./mk-python-derivation.nix else ./python2/mk-python-derivation.nix;
|
||||
|
||||
Reference in New Issue
Block a user