python2Packages: separate extension

This commit is contained in:
Frederik Rietdijk 2021-03-24 12:12:48 +01:00
parent 3955326221
commit 4f02e12f8a
2 changed files with 11 additions and 1 deletions

View File

@ -69,12 +69,15 @@ with pkgs;
recursivePthLoader
;
};
optionalExtensions = cond: as: if cond then as else [];
python2Extension = import ../../../top-level/python2-packages.nix;
extensions = lib.composeManyExtensions ((optionalExtensions (!self.isPy3k) [python2Extension]) ++ [ overrides ]);
in lib.makeScopeWithSplicing
pkgs.splicePackages
pkgs.newScope
otherSplices
keep
(lib.extends overrides pythonPackagesFun))
(lib.extends extensions pythonPackagesFun))
{
overrides = packageOverrides;
};

View File

@ -0,0 +1,7 @@
# Extension with Python 2 packages that is overlayed on top
# of the Python 3 packages set. This way, Python 2+3 compatible
# packages can still be used.
self: super: {
}