Skip to content

Commit

Permalink
Merge pull request #247245 from Artturin/passthrufunthng1
Browse files Browse the repository at this point in the history
Revert "Revert "python3: splice python within python3Packages.callPackage""
  • Loading branch information
Adam Joseph authored Aug 5, 2023
2 parents 25a22cd + 8eff2ee commit e67ff66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkgs/development/interpreters/python/hooks/default.nix
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/interpreters/python/passthrufun.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit e67ff66

Please sign in to comment.