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