python2Packages.buildPythonPackage: handle passthru with mkDerivation

Port to python2/mk-python-derivation.nix commit 21a1cf9686
("mkPythonPackage, mkPythonApplication:
handle passthru with mkDerivation").
This commit is contained in:
Yueh-Shun Li
2026-01-18 23:55:43 +08:00
parent 18ab0dced5
commit 57c0190caf

View File

@@ -272,6 +272,15 @@ let
outputs = outputs ++ lib.optional withDistOutput "dist";
passthru.updateScript =
let
filename = builtins.head (lib.splitString ":" self.meta.position);
in
attrs.passthru.updateScript or [
update-python-libraries
filename
];
meta = {
# default to python's platforms
platforms = python.meta.platforms;
@@ -289,16 +298,7 @@ let
}
)
);
passthru.updateScript =
let
filename = builtins.head (lib.splitString ":" self.meta.position);
in
attrs.passthru.updateScript or [
update-python-libraries
filename
];
in
lib.extendDerivation (
disabled -> throw "${name} not supported for interpreter ${python.executable}"
) passthru self
) { } self