This commit is contained in:
commit
df07954f74
27 files changed
+1129
No files matched your search
@@ -0,0 +1,80 @@
|
||||
{
|
||||
__splicedPackages,
|
||||
callPackage,
|
||||
fetchzip,
|
||||
config,
|
||||
db,
|
||||
lib,
|
||||
makeScopeWithSplicing',
|
||||
pythonPackagesExtensions,
|
||||
stdenv,
|
||||
path
|
||||
}@args:
|
||||
|
||||
(
|
||||
let
|
||||
pythonBase = path + "/pkgs/development/interpreters/python";
|
||||
|
||||
# Common passthru for all Python interpreters.
|
||||
passthruFun = import ( pythonBase + "/passthrufun.nix") args;
|
||||
fixupString = s: lib.replaceString "2.7" "2.6" (lib.replaceString "2.7.1" "2.6.9" s);
|
||||
|
||||
pythonRaw = ((callPackage "${pythonBase}/cpython/2.7" {
|
||||
# TODO: splicedPackages again
|
||||
self = __splicedPackages.python26;
|
||||
sourceVersion = {
|
||||
major = "2";
|
||||
minor = "6";
|
||||
patch = "9";
|
||||
suffix = ""; # ActiveState's Python 2 extended support
|
||||
};
|
||||
hash = "sha256-uxXpGJ5rGPb5x0bIg5yqyQmyLKrjIl0LZjgApzsfd3Q=";
|
||||
inherit passthruFun;
|
||||
}).override {
|
||||
rebuildBytecode = false;
|
||||
pythonAttr = "python26";
|
||||
packageOverrides = import ./python-overrides.nix;
|
||||
#packageOverridesss = _: super: {
|
||||
# setupTools = "lol";
|
||||
#};
|
||||
});
|
||||
|
||||
in {
|
||||
|
||||
python26 = pythonRaw.overrideAttrs (prev: {
|
||||
patches = [
|
||||
# Look in C_INCLUDE_PATH and LIBRARY_PATH for stuff.
|
||||
./python26/search-path.patch
|
||||
|
||||
# Python recompiles a Python if the mtime stored *in* the
|
||||
# pyc/pyo file differs from the mtime of the source file. This
|
||||
# doesn't work in Nix because Nix changes the mtime of files in
|
||||
# the Nix store to 1. So treat that as a special case.
|
||||
./python26/nix-store-mtime.patch
|
||||
|
||||
# http://bugs.python.org/issue10013
|
||||
./python26/python2.6-fix-parallel-make.patch
|
||||
];
|
||||
postInstall = fixupString prev.postInstall;
|
||||
preConfigure = lib.replaceString "${stdenv.cc.libc}/include/" "${stdenv.cc.libc.dev or stdenv.libc}/include/" prev.preConfigure;
|
||||
});
|
||||
|
||||
pypy27 = callPackage ./pypy {
|
||||
self = __splicedPackages.pypy27;
|
||||
sourceVersion = {
|
||||
major = "7";
|
||||
minor = "3";
|
||||
patch = "19";
|
||||
};
|
||||
|
||||
hash = "sha256-hwPNywH5+Clm3UO2pgGPFAOZ21HrtDwSXB+aIV57sAM=";
|
||||
pythonVersion = "2.7";
|
||||
db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
|
||||
python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
||||
inherit passthruFun;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs config.allowAliases {
|
||||
pypy39_prebuilt = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03
|
||||
}
|
||||
)
|
||||
Reference in new issue
Block a user