1{
2 __splicedPackages,
3 callPackage,
4 config,
5 db,
6 lib,
7 libffiBoot,
8 makeScopeWithSplicing',
9 pythonPackagesExtensions,
10 stdenv,
11}@args:
12
13(
14 let
15
16 # Common passthru for all Python interpreters.
17 passthruFun = import ./passthrufun.nix args;
18
19 sources = {
20 python312 = {
21 sourceVersion = {
22 major = "3";
23 minor = "12";
24 patch = "10";
25 suffix = "";
26 };
27 hash = "sha256-B6tpdHRZXgbwZkdBfTx/qX3tB6/Bp+RFTFY5kZtG6uo=";
28 };
29 };
30
31 in
32 {
33
34 python27 = callPackage ./cpython/2.7 {
35 self = __splicedPackages.python27;
36 sourceVersion = {
37 major = "2";
38 minor = "7";
39 patch = "18";
40 suffix = ".8"; # ActiveState's Python 2 extended support
41 };
42 hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI=";
43 inherit passthruFun;
44 };
45
46 python310 = callPackage ./cpython {
47 self = __splicedPackages.python310;
48 sourceVersion = {
49 major = "3";
50 minor = "10";
51 patch = "17";
52 suffix = "";
53 };
54 hash = "sha256-TGgFDwSdG0rFqt0N9fJ5QcA1DSqeerCQfuXrUiXZ1rA=";
55 inherit passthruFun;
56 };
57
58 python311 = callPackage ./cpython {
59 self = __splicedPackages.python311;
60 sourceVersion = {
61 major = "3";
62 minor = "11";
63 patch = "12";
64 suffix = "";
65 };
66 hash = "sha256-hJ2oevTfE3cQwXluJ2qVX3qFyflxCBBnyPVl0Vw1Kgk=";
67 inherit passthruFun;
68 };
69
70 python312 = callPackage ./cpython (
71 {
72 self = __splicedPackages.python312;
73 inherit passthruFun;
74 }
75 // sources.python312
76 );
77
78 python313 = callPackage ./cpython {
79 self = __splicedPackages.python313;
80 sourceVersion = {
81 major = "3";
82 minor = "13";
83 patch = "3";
84 suffix = "";
85 };
86 hash = "sha256-QPhovL3rgUmjFJWAu5v9QHszIc1I8L5jGvlVrJLA4EE=";
87 inherit passthruFun;
88 };
89
90 python314 = callPackage ./cpython {
91 self = __splicedPackages.python314;
92 sourceVersion = {
93 major = "3";
94 minor = "14";
95 patch = "0";
96 suffix = "b2";
97 };
98 hash = "sha256-esnoSES7wKWo8feaN6aLO4yvKli0qlmZxJInyzbnDqY=";
99 inherit passthruFun;
100 };
101 # Minimal versions of Python (built without optional dependencies)
102 python3Minimal =
103 (callPackage ./cpython (
104 {
105 self = __splicedPackages.python3Minimal;
106 inherit passthruFun;
107 pythonAttr = "python3Minimal";
108 # strip down that python version as much as possible
109 openssl = null;
110 readline = null;
111 ncurses = null;
112 gdbm = null;
113 sqlite = null;
114 tzdata = null;
115 libuuid = null;
116 libffi = libffiBoot; # without test suite
117 stripConfig = true;
118 stripIdlelib = true;
119 stripTests = true;
120 stripTkinter = true;
121 rebuildBytecode = false;
122 stripBytecode = true;
123 includeSiteCustomize = false;
124 enableOptimizations = false;
125 enableLTO = false;
126 mimetypesSupport = false;
127 }
128 // sources.python312
129 )).overrideAttrs
130 (old: {
131 # TODO(@Artturin): Add this to the main cpython expr
132 strictDeps = true;
133 pname = "python3-minimal";
134 });
135
136 pypy27 = callPackage ./pypy {
137 self = __splicedPackages.pypy27;
138 sourceVersion = {
139 major = "7";
140 minor = "3";
141 patch = "19";
142 };
143
144 hash = "sha256-hwPNywH5+Clm3UO2pgGPFAOZ21HrtDwSXB+aIV57sAM=";
145 pythonVersion = "2.7";
146 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
147 python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
148 inherit passthruFun;
149 };
150
151 pypy310 = callPackage ./pypy {
152 self = __splicedPackages.pypy310;
153 sourceVersion = {
154 major = "7";
155 minor = "3";
156 patch = "19";
157 };
158
159 hash = "sha256-p8IpMLkY9Ahwhl7Yp0FH9ENO+E09bKKzweupNV1JKcg=";
160 pythonVersion = "3.10";
161 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
162 python = __splicedPackages.pypy27;
163 inherit passthruFun;
164 };
165
166 pypy311 = callPackage ./pypy {
167 self = __splicedPackages.pypy311;
168 sourceVersion = {
169 major = "7";
170 minor = "3";
171 patch = "19";
172 };
173
174 hash = "sha256-SBfARLtGmjJ05gqjZFdw+B60+RZup/3E5sNRNFVUyNg=";
175 pythonVersion = "3.11";
176 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
177 python = __splicedPackages.pypy27;
178 inherit passthruFun;
179 };
180
181 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
182 # Not included at top-level
183 self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
184 sourceVersion = {
185 major = "7";
186 minor = "3";
187 patch = "19";
188 };
189
190 hash =
191 {
192 aarch64-linux = "sha256-/onU/UrxP3bf5zFZdQA1GM8XZSDjzOwVRKiNF09QkQ4=";
193 x86_64-linux = "sha256-04RFUIwurxTrs4DZwd7TIcXr6uMcfmaAAXPYPLjd9CM=";
194 aarch64-darwin = "sha256-KHgOC5CK1ttLTglvQjcSS+eezJcxlG2EDZyHSetnp1k=";
195 x86_64-darwin = "sha256-a+KNRI2OZP/8WG2bCuTQkGSoPMrrW4BgxlHFzZrgaHg=";
196 }
197 .${stdenv.system};
198 pythonVersion = "2.7";
199 inherit passthruFun;
200 };
201
202 pypy310_prebuilt = callPackage ./pypy/prebuilt.nix {
203 # Not included at top-level
204 self = __splicedPackages.pythonInterpreters.pypy310_prebuilt;
205 sourceVersion = {
206 major = "7";
207 minor = "3";
208 patch = "19";
209 };
210 hash =
211 {
212 aarch64-linux = "sha256-ryeliRePERmOIkSrZcpRBjC6l8Ex18zEAh61vFjef1c=";
213 x86_64-linux = "sha256-xzrCzCOArJIn/Sl0gr8qPheoBhi6Rtt1RNU1UVMh7B4=";
214 aarch64-darwin = "sha256-PbigP8SWFkgBZGhE1/OxK6oK2zrZoLfLEkUhvC4WijY=";
215 x86_64-darwin = "sha256-LF5cKjOsiCVR1/KLmNGdSGuJlapQgkpztO3Mau7DXGM=";
216 }
217 .${stdenv.system};
218 pythonVersion = "3.10";
219 inherit passthruFun;
220 };
221
222 pypy311_prebuilt = callPackage ./pypy/prebuilt.nix {
223 # Not included at top-level
224 self = __splicedPackages.pythonInterpreters.pypy311_prebuilt;
225 sourceVersion = {
226 major = "7";
227 minor = "3";
228 patch = "19";
229 };
230 hash =
231 {
232 aarch64-linux = "sha256-EyB9v4HOJOltp2CxuGNie3e7ILH7TJUZHgKgtyOD33Q=";
233 x86_64-linux = "sha256-kXfZ4LuRsF+SHGQssP9xoPNlO10ppC1A1qB4wVt1cg8=";
234 aarch64-darwin = "sha256-dwTg1TAuU5INMtz+mv7rEENtTJQjPogwz2A6qVWoYcE=";
235 x86_64-darwin = "sha256-okOfnTDf2ulqXpEBx9xUqKaLVsnXMU6jmbCiXT6H67I=";
236 }
237 .${stdenv.system};
238 pythonVersion = "3.11";
239 inherit passthruFun;
240 };
241 }
242 // lib.optionalAttrs config.allowAliases {
243 pypy39_prebuilt = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03
244 }
245)