diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index 338e15f02485b..001e477b9185b 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -1,9 +1,9 @@ -self: dontUse: with self; +self: super: with self; let - pythonInterpreter = python.pythonForBuild.interpreter; - pythonSitePackages = python.sitePackages; - pythonCheckInterpreter = python.interpreter; + pythonInterpreter = super.python.pythonForBuild.interpreter; + pythonSitePackages = super.python.sitePackages; + pythonCheckInterpreter = super.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 b73885b5e29e1..aa63f354e085d 100644 --- a/pkgs/development/interpreters/python/passthrufun.nix +++ b/pkgs/development/interpreters/python/passthrufun.nix @@ -47,13 +47,12 @@ selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget. }; hooks = import ./hooks/default.nix; - keep = self: hooks self {}; + keep = lib.extends hooks pythonPackagesFun; 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 @@ -65,7 +64,7 @@ otherSplices keep extra - (lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun)) + (lib.extends (lib.composeExtensions aliases extensions) keep)) { overrides = packageOverrides; python = self;