1{ __splicedPackages
2, callPackage
3, config
4, darwin
5, db
6, lib
7, libffiBoot
8, makeScopeWithSplicing'
9, pythonPackagesExtensions
10, stdenv
11}@args:
12
13(let
14
15 # Common passthru for all Python interpreters.
16 passthruFun = import ./passthrufun.nix args;
17
18 sources = {
19 python312 = {
20 sourceVersion = {
21 major = "3";
22 minor = "12";
23 patch = "7";
24 suffix = "";
25 };
26 hash = "sha256-JIh7kuKv1KKsYCQZrUtZY3L2esmwdxkPRZq6OQ+vVVA=";
27 };
28 };
29
30in {
31
32 python27 = callPackage ./cpython/2.7 {
33 self = __splicedPackages.python27;
34 sourceVersion = {
35 major = "2";
36 minor = "7";
37 patch = "18";
38 suffix = ".8"; # ActiveState's Python 2 extended support
39 };
40 hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI=";
41 inherit passthruFun;
42 };
43
44 python39 = callPackage ./cpython {
45 self = __splicedPackages.python39;
46 sourceVersion = {
47 major = "3";
48 minor = "9";
49 patch = "21";
50 suffix = "";
51 };
52 hash = "sha256-MSb1lZLJsNeYWEdV8r97CB+hyjXOem/qmAEI11KgW7E=";
53 inherit passthruFun;
54 };
55
56 python310 = callPackage ./cpython {
57 self = __splicedPackages.python310;
58 sourceVersion = {
59 major = "3";
60 minor = "10";
61 patch = "16";
62 suffix = "";
63 };
64 hash = "sha256-v7JJYJmQIgSRobkoUKBxNe0IMeQXOM9oHWPPAbKo+9E=";
65 inherit passthruFun;
66 };
67
68 python311 = callPackage ./cpython {
69 self = __splicedPackages.python311;
70 sourceVersion = {
71 major = "3";
72 minor = "11";
73 patch = "10";
74 suffix = "";
75 };
76 hash = "sha256-B6Q1bpEpAOYaFcsJSaBsSgUBLiE+zWtOhND2equ+43I=";
77 inherit passthruFun;
78 };
79
80 python312 = callPackage ./cpython ({
81 self = __splicedPackages.python312;
82 inherit passthruFun;
83 } // sources.python312);
84
85 python313 = callPackage ./cpython {
86 self = __splicedPackages.python313;
87 sourceVersion = {
88 major = "3";
89 minor = "13";
90 patch = "1";
91 suffix = "";
92 };
93 hash = "sha256-nPlCe+6eIkLjh33Q9rZBwYU8pGHznWUDziYKWcgL8Nk=";
94 inherit passthruFun;
95 };
96
97 python314 = callPackage ./cpython {
98 self = __splicedPackages.python314;
99 sourceVersion = {
100 major = "3";
101 minor = "14";
102 patch = "0";
103 suffix = "a2";
104 };
105 hash = "sha256-L/nhAUc0Kz79afXNnMBuxGJQ8qBGWHWZ0Y4srGnAWSA=";
106 inherit passthruFun;
107 };
108 # Minimal versions of Python (built without optional dependencies)
109 python3Minimal = (callPackage ./cpython ({
110 self = __splicedPackages.python3Minimal;
111 inherit passthruFun;
112 pythonAttr = "python3Minimal";
113 # strip down that python version as much as possible
114 openssl = null;
115 readline = null;
116 ncurses = null;
117 gdbm = null;
118 sqlite = null;
119 tzdata = null;
120 libffi = libffiBoot; # without test suite
121 stripConfig = true;
122 stripIdlelib = true;
123 stripTests = true;
124 stripTkinter = true;
125 rebuildBytecode = false;
126 stripBytecode = true;
127 includeSiteCustomize = false;
128 enableOptimizations = false;
129 enableLTO = false;
130 mimetypesSupport = false;
131 } // sources.python312)).overrideAttrs(old: {
132 # TODO(@Artturin): Add this to the main cpython expr
133 strictDeps = true;
134 pname = "python3-minimal";
135 });
136
137 pypy27 = callPackage ./pypy {
138 self = __splicedPackages.pypy27;
139 sourceVersion = {
140 major = "7";
141 minor = "3";
142 patch = "12";
143 };
144
145 hash = "sha256-3WHYjaJ0ws4s7HdmfUo9+aZSvMUOJvkJkdTdCvZrzPQ=";
146 pythonVersion = "2.7";
147 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
148 python = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
149 inherit passthruFun;
150 };
151
152 pypy39 = callPackage ./pypy {
153 self = __splicedPackages.pypy39;
154 sourceVersion = {
155 major = "7";
156 minor = "3";
157 patch = "12";
158 };
159
160 hash = "sha256-56IEbH5sJfw4aru1Ey6Sp8wkkeOTVpmpRstdy7NCwqo=";
161 pythonVersion = "3.9";
162 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; };
163 python = __splicedPackages.pypy27;
164 inherit passthruFun;
165 };
166
167 pypy310 = __splicedPackages.pypy39.override {
168 self = __splicedPackages.pythonInterpreters.pypy310;
169 pythonVersion = "3.10";
170 hash = "sha256-huTk6sw2BGxhgvQwGHllN/4zpg4dKizGuOf5Gl3LPkI=";
171 };
172
173 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
174 # Not included at top-level
175 self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
176 sourceVersion = {
177 major = "7";
178 minor = "3";
179 patch = "12";
180 };
181
182 hash = {
183 aarch64-linux = "sha256-4E3LYoantHJOw/DlDTzBuoWDMB3RZYwG1/N1meQgHFk=";
184 x86_64-linux = "sha256-GmGiV0t5Rm9gYBDymZormVvZbNCF+Rp46909XCxA6B0=";
185 aarch64-darwin = "sha256-a3R6oHauhZfklgPF3sTKWTWhoKEy10BKVZvpaiYNm/c=";
186 x86_64-darwin = "sha256-bon/3RVTfOT/zjFFtl7lfC6clSiSvZW5NAEtLwCfUDs=";
187 }.${stdenv.system};
188 pythonVersion = "2.7";
189 inherit passthruFun;
190 };
191
192 pypy39_prebuilt = callPackage ./pypy/prebuilt.nix {
193 # Not included at top-level
194 self = __splicedPackages.pythonInterpreters.pypy39_prebuilt;
195 sourceVersion = {
196 major = "7";
197 minor = "3";
198 patch = "12";
199 };
200 hash = {
201 aarch64-linux = "sha256-6TJ/ue2vKtkZNdW4Vj7F/yQZO92xdcGsqvdywCWvGCQ=";
202 x86_64-linux = "sha256-hMiblm+rK1j0UaSC7jDKf+wzUENb0LlhRhXGHcbaI5A=";
203 aarch64-darwin = "sha256-DooaNGi5eQxzSsaY9bAMwD/BaJnMxs6HZGX6wLg5gOM=";
204 x86_64-darwin = "sha256-ZPAI/6BwxAfl70bIJWsuAU3nGW6l2Fg4WGElTnlZ9Os=";
205 }.${stdenv.system};
206 pythonVersion = "3.9";
207 inherit passthruFun;
208 };
209
210 rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
211 inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
212 };
213
214})