at master 6.4 kB view raw
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 = "7"; 24 suffix = ""; 25 }; 26 hash = "sha256-VGL5CZ39MOI43vg8cdkYl9jKpf9uvHpQ8U1IAs2qp5o="; 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 = ".8"; # ActiveState's Python 2 extended support 40 }; 41 hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI="; 42 inherit passthruFun; 43 }; 44 45 python310 = callPackage ./cpython { 46 self = __splicedPackages.python310; 47 sourceVersion = { 48 major = "3"; 49 minor = "10"; 50 patch = "18"; 51 suffix = ""; 52 }; 53 hash = "sha256-rmZbxnir2atqbhVz0kgWJaU3GbxRfppjTtK5/vrjgX8="; 54 inherit passthruFun; 55 }; 56 57 python311 = callPackage ./cpython { 58 self = __splicedPackages.python311; 59 sourceVersion = { 60 major = "3"; 61 minor = "11"; 62 patch = "13"; 63 suffix = ""; 64 }; 65 hash = "sha256-j7X5+8dgn6giyzFUmIRXXbf9llfL/7iVELXXl1ljqDo="; 66 inherit passthruFun; 67 }; 68 69 python312 = callPackage ./cpython { 70 self = __splicedPackages.python312; 71 sourceVersion = { 72 major = "3"; 73 minor = "12"; 74 patch = "11"; 75 suffix = ""; 76 }; 77 hash = "sha256-wwuyS38emhmxG1WlRkNPdOc5u0wnGj46gP9DgNSfets="; 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 = "0"; 95 suffix = "rc3"; 96 }; 97 hash = "sha256-ZG3JReScc6FBiW3toS1D8/KT/WlCZ3TBb8Q0lhgOj80="; 98 inherit passthruFun; 99 }; 100 # Minimal versions of Python (built without optional dependencies) 101 python3Minimal = 102 (callPackage ./cpython ( 103 { 104 self = __splicedPackages.python3Minimal; 105 inherit passthruFun; 106 pythonAttr = "python3Minimal"; 107 # strip down that python version as much as possible 108 withMinimalDeps = true; 109 } 110 // sources.python313 111 )).overrideAttrs 112 (old: { 113 # TODO(@Artturin): Add this to the main cpython expr 114 strictDeps = true; 115 pname = "python3-minimal"; 116 }); 117 118 pypy27 = callPackage ./pypy { 119 self = __splicedPackages.pypy27; 120 sourceVersion = { 121 major = "7"; 122 minor = "3"; 123 patch = "19"; 124 }; 125 126 hash = "sha256-hwPNywH5+Clm3UO2pgGPFAOZ21HrtDwSXB+aIV57sAM="; 127 pythonVersion = "2.7"; 128 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; 129 python = __splicedPackages.pythonInterpreters.pypy27_prebuilt; 130 inherit passthruFun; 131 }; 132 133 pypy310 = callPackage ./pypy { 134 self = __splicedPackages.pypy310; 135 sourceVersion = { 136 major = "7"; 137 minor = "3"; 138 patch = "19"; 139 }; 140 141 hash = "sha256-p8IpMLkY9Ahwhl7Yp0FH9ENO+E09bKKzweupNV1JKcg="; 142 pythonVersion = "3.10"; 143 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; 144 python = __splicedPackages.pypy27; 145 inherit passthruFun; 146 }; 147 148 pypy311 = callPackage ./pypy { 149 self = __splicedPackages.pypy311; 150 sourceVersion = { 151 major = "7"; 152 minor = "3"; 153 patch = "20"; 154 }; 155 156 hash = "sha256-d4bdp2AAPi6nQJwQN+UCAMV47EJ84CRaxM11hxCyBvs="; 157 pythonVersion = "3.11"; 158 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; 159 python = __splicedPackages.pypy27; 160 inherit passthruFun; 161 }; 162 163 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { 164 # Not included at top-level 165 self = __splicedPackages.pythonInterpreters.pypy27_prebuilt; 166 sourceVersion = { 167 major = "7"; 168 minor = "3"; 169 patch = "19"; 170 }; 171 172 hash = 173 { 174 aarch64-linux = "sha256-/onU/UrxP3bf5zFZdQA1GM8XZSDjzOwVRKiNF09QkQ4="; 175 x86_64-linux = "sha256-04RFUIwurxTrs4DZwd7TIcXr6uMcfmaAAXPYPLjd9CM="; 176 aarch64-darwin = "sha256-KHgOC5CK1ttLTglvQjcSS+eezJcxlG2EDZyHSetnp1k="; 177 x86_64-darwin = "sha256-a+KNRI2OZP/8WG2bCuTQkGSoPMrrW4BgxlHFzZrgaHg="; 178 } 179 .${stdenv.system}; 180 pythonVersion = "2.7"; 181 inherit passthruFun; 182 }; 183 184 pypy310_prebuilt = callPackage ./pypy/prebuilt.nix { 185 # Not included at top-level 186 self = __splicedPackages.pythonInterpreters.pypy310_prebuilt; 187 sourceVersion = { 188 major = "7"; 189 minor = "3"; 190 patch = "19"; 191 }; 192 hash = 193 { 194 aarch64-linux = "sha256-ryeliRePERmOIkSrZcpRBjC6l8Ex18zEAh61vFjef1c="; 195 x86_64-linux = "sha256-xzrCzCOArJIn/Sl0gr8qPheoBhi6Rtt1RNU1UVMh7B4="; 196 aarch64-darwin = "sha256-PbigP8SWFkgBZGhE1/OxK6oK2zrZoLfLEkUhvC4WijY="; 197 x86_64-darwin = "sha256-LF5cKjOsiCVR1/KLmNGdSGuJlapQgkpztO3Mau7DXGM="; 198 } 199 .${stdenv.system}; 200 pythonVersion = "3.10"; 201 inherit passthruFun; 202 }; 203 204 pypy311_prebuilt = callPackage ./pypy/prebuilt.nix { 205 # Not included at top-level 206 self = __splicedPackages.pythonInterpreters.pypy311_prebuilt; 207 sourceVersion = { 208 major = "7"; 209 minor = "3"; 210 patch = "19"; 211 }; 212 hash = 213 { 214 aarch64-linux = "sha256-EyB9v4HOJOltp2CxuGNie3e7ILH7TJUZHgKgtyOD33Q="; 215 x86_64-linux = "sha256-kXfZ4LuRsF+SHGQssP9xoPNlO10ppC1A1qB4wVt1cg8="; 216 aarch64-darwin = "sha256-dwTg1TAuU5INMtz+mv7rEENtTJQjPogwz2A6qVWoYcE="; 217 x86_64-darwin = "sha256-okOfnTDf2ulqXpEBx9xUqKaLVsnXMU6jmbCiXT6H67I="; 218 } 219 .${stdenv.system}; 220 pythonVersion = "3.11"; 221 inherit passthruFun; 222 }; 223 } 224 // lib.optionalAttrs config.allowAliases { 225 pypy39_prebuilt = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03 226 } 227)