2022-10-21 18:38:19 +00:00
|
|
|
{ __splicedPackages
|
|
|
|
, callPackage
|
|
|
|
, config
|
|
|
|
, darwin
|
|
|
|
, db
|
|
|
|
, lib
|
|
|
|
, libffiBoot
|
2023-08-22 20:05:09 +00:00
|
|
|
, makeScopeWithSplicing'
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonPackagesExtensions
|
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
}@args:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
(let
|
|
|
|
|
|
|
|
# Common passthru for all Python interpreters.
|
2023-07-15 17:15:38 +00:00
|
|
|
passthruFun = import ./passthrufun.nix args;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
sources = {
|
2023-03-04 12:14:45 +00:00
|
|
|
python311 = {
|
2022-02-10 20:34:41 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
2023-03-04 12:14:45 +00:00
|
|
|
minor = "11";
|
2024-04-21 15:54:59 +00:00
|
|
|
patch = "9";
|
2022-02-10 20:34:41 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-mx6JZSP8UQaREmyGRAbZNgo9Hphqy9pZzaV7Wr2kW4c=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
in {
|
|
|
|
|
|
|
|
python27 = callPackage ./cpython/2.7 {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python27;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "2";
|
|
|
|
minor = "7";
|
|
|
|
patch = "18";
|
2024-04-21 15:54:59 +00:00
|
|
|
suffix = ".8"; # ActiveState's Python 2 extended support
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
python39 = callPackage ./cpython {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python39;
|
2023-03-04 12:14:45 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "9";
|
2024-04-21 15:54:59 +00:00
|
|
|
patch = "19";
|
2023-03-04 12:14:45 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-1Iks0WGPZFjLhRIIwDDfFIJ3lgnQ85OZkb04GE+MZ54=";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
python310 = callPackage ./cpython {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python310;
|
2024-02-29 20:09:43 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "10";
|
2024-04-21 15:54:59 +00:00
|
|
|
patch = "14";
|
2024-02-29 20:09:43 +00:00
|
|
|
suffix = "";
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-nFBIH6qMKDIym6D8iGjQpgamgPxPYOxI0mzo4HZ1H9o=";
|
2020-10-19 23:25:03 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
python311 = callPackage ./cpython ({
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python311;
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
2023-03-04 12:14:45 +00:00
|
|
|
} // sources.python311);
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
python312 = callPackage ./cpython {
|
|
|
|
self = __splicedPackages.python312;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "12";
|
2024-04-21 15:54:59 +00:00
|
|
|
patch = "3";
|
2023-10-09 19:29:22 +00:00
|
|
|
suffix = "";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Vr/vH9/BIhzmcg5DpmHj60F4XdkUzplpjYx4lq9L2qE=";
|
2021-12-26 17:43:05 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
python313 = callPackage ./cpython {
|
|
|
|
self = __splicedPackages.python313;
|
|
|
|
sourceVersion = {
|
|
|
|
major = "3";
|
|
|
|
minor = "13";
|
|
|
|
patch = "0";
|
2024-07-01 15:47:52 +00:00
|
|
|
suffix = "b3";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-O+CUrQixHcKgZUY1JCOceNyfKzQrAdzU4eYG27xceKU=";
|
2023-10-19 13:55:26 +00:00
|
|
|
inherit (darwin) configd;
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
# Minimal versions of Python (built without optional dependencies)
|
2021-04-05 15:23:46 +00:00
|
|
|
python3Minimal = (callPackage ./cpython ({
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.python3Minimal;
|
2021-04-05 15:23:46 +00:00
|
|
|
inherit passthruFun;
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonAttr = "python3Minimal";
|
2020-04-24 23:36:52 +00:00
|
|
|
# strip down that python version as much as possible
|
|
|
|
openssl = null;
|
|
|
|
readline = null;
|
|
|
|
ncurses = null;
|
|
|
|
gdbm = null;
|
|
|
|
configd = null;
|
2024-02-29 20:09:43 +00:00
|
|
|
sqlite = null;
|
2021-04-05 15:23:46 +00:00
|
|
|
tzdata = null;
|
2022-10-21 18:38:19 +00:00
|
|
|
libffi = libffiBoot; # without test suite
|
2020-04-24 23:36:52 +00:00
|
|
|
stripConfig = true;
|
|
|
|
stripIdlelib = true;
|
|
|
|
stripTests = true;
|
|
|
|
stripTkinter = true;
|
|
|
|
rebuildBytecode = false;
|
|
|
|
stripBytecode = true;
|
|
|
|
includeSiteCustomize = false;
|
2020-06-18 07:06:33 +00:00
|
|
|
enableOptimizations = false;
|
2021-07-21 07:28:18 +00:00
|
|
|
enableLTO = false;
|
2021-04-05 15:23:46 +00:00
|
|
|
mimetypesSupport = false;
|
2023-11-16 04:20:00 +00:00
|
|
|
} // sources.python311)).overrideAttrs(old: {
|
2022-06-16 17:23:12 +00:00
|
|
|
# TODO(@Artturin): Add this to the main cpython expr
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python3-minimal";
|
|
|
|
});
|
|
|
|
|
|
|
|
pypy27 = callPackage ./pypy {
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.pypy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-10-09 19:29:22 +00:00
|
|
|
patch = "12";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-3WHYjaJ0ws4s7HdmfUo9+aZSvMUOJvkJkdTdCvZrzPQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonVersion = "2.7";
|
|
|
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
2023-01-11 07:51:40 +00:00
|
|
|
python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
inherit (darwin) libunwind;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pypy39 = callPackage ./pypy {
|
|
|
|
self = __splicedPackages.pypy39;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-10-09 19:29:22 +00:00
|
|
|
patch = "12";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-56IEbH5sJfw4aru1Ey6Sp8wkkeOTVpmpRstdy7NCwqo=";
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonVersion = "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
2023-01-11 07:51:40 +00:00
|
|
|
python = __splicedPackages.pypy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
inherit (darwin) libunwind;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
pypy310 = __splicedPackages.pypy39.override {
|
|
|
|
self = __splicedPackages.pythonInterpreters.pypy310;
|
|
|
|
pythonVersion = "3.10";
|
|
|
|
hash = "sha256-huTk6sw2BGxhgvQwGHllN/4zpg4dKizGuOf5Gl3LPkI=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
|
2020-04-24 23:36:52 +00:00
|
|
|
# Not included at top-level
|
2022-10-21 18:38:19 +00:00
|
|
|
self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-10-09 19:29:22 +00:00
|
|
|
patch = "12";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = {
|
2023-10-09 19:29:22 +00:00
|
|
|
aarch64-linux = "sha256-4E3LYoantHJOw/DlDTzBuoWDMB3RZYwG1/N1meQgHFk=";
|
|
|
|
x86_64-linux = "sha256-GmGiV0t5Rm9gYBDymZormVvZbNCF+Rp46909XCxA6B0=";
|
|
|
|
aarch64-darwin = "sha256-a3R6oHauhZfklgPF3sTKWTWhoKEy10BKVZvpaiYNm/c=";
|
|
|
|
x86_64-darwin = "sha256-bon/3RVTfOT/zjFFtl7lfC6clSiSvZW5NAEtLwCfUDs=";
|
2023-01-11 07:51:40 +00:00
|
|
|
}.${stdenv.system};
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonVersion = "2.7";
|
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pypy39_prebuilt = callPackage ./pypy/prebuilt.nix {
|
2020-04-24 23:36:52 +00:00
|
|
|
# Not included at top-level
|
2024-01-13 08:15:51 +00:00
|
|
|
self = __splicedPackages.pythonInterpreters.pypy39_prebuilt;
|
2020-04-24 23:36:52 +00:00
|
|
|
sourceVersion = {
|
|
|
|
major = "7";
|
2020-08-20 17:08:02 +00:00
|
|
|
minor = "3";
|
2023-10-09 19:29:22 +00:00
|
|
|
patch = "12";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = {
|
2023-10-09 19:29:22 +00:00
|
|
|
aarch64-linux = "sha256-6TJ/ue2vKtkZNdW4Vj7F/yQZO92xdcGsqvdywCWvGCQ=";
|
|
|
|
x86_64-linux = "sha256-hMiblm+rK1j0UaSC7jDKf+wzUENb0LlhRhXGHcbaI5A=";
|
|
|
|
aarch64-darwin = "sha256-DooaNGi5eQxzSsaY9bAMwD/BaJnMxs6HZGX6wLg5gOM=";
|
|
|
|
x86_64-darwin = "sha256-ZPAI/6BwxAfl70bIJWsuAU3nGW6l2Fg4WGElTnlZ9Os=";
|
2023-01-11 07:51:40 +00:00
|
|
|
}.${stdenv.system};
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonVersion = "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit passthruFun;
|
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
|
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|