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