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