From 57c0190caf3afbc07ef439c7f48155d2d5df50f4 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sun, 18 Jan 2026 23:55:43 +0800 Subject: [PATCH] python2Packages.buildPythonPackage: handle passthru with mkDerivation Port to python2/mk-python-derivation.nix commit 21a1cf96866c ("mkPythonPackage, mkPythonApplication: handle passthru with mkDerivation"). --- .../python/python2/mk-python-derivation.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix index 817225bcc47c..47a5c2e65d49 100644 --- a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix @@ -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