From 8eff2eea8cbe5893055e1dc831f49c4a40d60179 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 5 Aug 2023 01:15:48 +0300 Subject: [PATCH] Revert "Revert "python3: splice python within python3Packages.callPackage"" This reverts commit 2ffca30cded859fdbde6f1ae4685e29f92c20424. `793cc9d982415b71cdba729cf779bfc49e9d2ae7` `python3: splice python within python3Packages.callPackage` Was reverted because it broke `pkgsCross.aarch64-multiplatform.python3Packages.cryptography` But by reverting the revert `pkgsCross.aarch64-multiplatform.python3Packages.cryptography` still builds. I tried reverting the 2 cryptography update commits, and it still worked, so I do not know why this would work now. --- pkgs/development/interpreters/python/hooks/default.nix | 8 ++++---- pkgs/development/interpreters/python/passthrufun.nix | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index bd29d493ebb8..a653ada4837d 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -1,9 +1,9 @@ -self: super: with self; +self: dontUse: with self; let - pythonInterpreter = super.python.pythonForBuild.interpreter; - pythonSitePackages = super.python.sitePackages; - pythonCheckInterpreter = super.python.interpreter; + pythonInterpreter = python.pythonForBuild.interpreter; + pythonSitePackages = python.sitePackages; + pythonCheckInterpreter = python.interpreter; setuppy = ../run_setup.py; in { makePythonHook = args: pkgs.makeSetupHook ({passthru.provides.setupHook = true; } // args); diff --git a/pkgs/development/interpreters/python/passthrufun.nix b/pkgs/development/interpreters/python/passthrufun.nix index aa63f354e085..b73885b5e29e 100644 --- a/pkgs/development/interpreters/python/passthrufun.nix +++ b/pkgs/development/interpreters/python/passthrufun.nix @@ -47,12 +47,13 @@ selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget. }; hooks = import ./hooks/default.nix; - keep = lib.extends hooks pythonPackagesFun; + keep = self: hooks self {}; extra = _: {}; optionalExtensions = cond: as: lib.optionals cond as; pythonExtension = import ../../../top-level/python-packages.nix; python2Extension = import ../../../top-level/python2-packages.nix; extensions = lib.composeManyExtensions ([ + hooks pythonExtension ] ++ (optionalExtensions (!self.isPy3k) [ python2Extension @@ -64,7 +65,7 @@ otherSplices keep extra - (lib.extends (lib.composeExtensions aliases extensions) keep)) + (lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun)) { overrides = packageOverrides; python = self;