mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 16:11:22 +00:00
python2Packages.buildPythonPackage: preserve disabled after <pkg>.overrideAttrs
Port to python2/mk-python-derivation.nix commit bb3a41f312
("buildPython*: fix the disabled functionality for overrideAttrs-")
This commit is contained in:
@@ -304,7 +304,18 @@ let
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
# Workaround to make the `lib.extendDerivation`-based disabled functionality
|
||||
# respect `<pkg>.overrideAttrs`
|
||||
# It doesn't cover `<pkg>.<output>.overrideAttrs`.
|
||||
disablePythonPackage =
|
||||
drv:
|
||||
lib.extendDerivation (
|
||||
drv.disabled
|
||||
-> throw "${lib.removePrefix namePrefix drv.name} not supported for interpreter ${python.executable}"
|
||||
) { } drv
|
||||
// {
|
||||
overrideAttrs = fdrv: disablePythonPackage (drv.overrideAttrs fdrv);
|
||||
};
|
||||
in
|
||||
lib.extendDerivation (
|
||||
disabled -> throw "${name} not supported for interpreter ${python.executable}"
|
||||
) { } self
|
||||
disablePythonPackage self
|
||||
|
||||
Reference in New Issue
Block a user