at 25.11-pre 5.8 kB view raw
1{ 2 __splicedPackages, 3 callPackage, 4 config, 5 db, 6 lib, 7 libffiBoot, 8 makeScopeWithSplicing', 9 pythonPackagesExtensions, 10 stdenv, 11}@args: 12 13( 14 let 15 16 # Common passthru for all Python interpreters. 17 passthruFun = import ./passthrufun.nix args; 18 19 sources = { 20 python312 = { 21 sourceVersion = { 22 major = "3"; 23 minor = "12"; 24 patch = "10"; 25 suffix = ""; 26 }; 27 hash = "sha256-B6tpdHRZXgbwZkdBfTx/qX3tB6/Bp+RFTFY5kZtG6uo="; 28 }; 29 }; 30 31 in 32 { 33 34 python27 = callPackage ./cpython/2.7 { 35 self = __splicedPackages.python27; 36 sourceVersion = { 37 major = "2"; 38 minor = "7"; 39 patch = "18"; 40 suffix = ".8"; # ActiveState's Python 2 extended support 41 }; 42 hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI="; 43 inherit passthruFun; 44 }; 45 46 python310 = callPackage ./cpython { 47 self = __splicedPackages.python310; 48 sourceVersion = { 49 major = "3"; 50 minor = "10"; 51 patch = "17"; 52 suffix = ""; 53 }; 54 hash = "sha256-TGgFDwSdG0rFqt0N9fJ5QcA1DSqeerCQfuXrUiXZ1rA="; 55 inherit passthruFun; 56 }; 57 58 python311 = callPackage ./cpython { 59 self = __splicedPackages.python311; 60 sourceVersion = { 61 major = "3"; 62 minor = "11"; 63 patch = "12"; 64 suffix = ""; 65 }; 66 hash = "sha256-hJ2oevTfE3cQwXluJ2qVX3qFyflxCBBnyPVl0Vw1Kgk="; 67 inherit passthruFun; 68 }; 69 70 python312 = callPackage ./cpython ( 71 { 72 self = __splicedPackages.python312; 73 inherit passthruFun; 74 } 75 // sources.python312 76 ); 77 78 python313 = callPackage ./cpython { 79 self = __splicedPackages.python313; 80 sourceVersion = { 81 major = "3"; 82 minor = "13"; 83 patch = "3"; 84 suffix = ""; 85 }; 86 hash = "sha256-QPhovL3rgUmjFJWAu5v9QHszIc1I8L5jGvlVrJLA4EE="; 87 inherit passthruFun; 88 }; 89 90 python314 = callPackage ./cpython { 91 self = __splicedPackages.python314; 92 sourceVersion = { 93 major = "3"; 94 minor = "14"; 95 patch = "0"; 96 suffix = "b1"; 97 }; 98 hash = "sha256-Ld0wp3yfYuBlzmSGZKJUubDAEbzaqMHCeHCH5kTL6zk="; 99 inherit passthruFun; 100 }; 101 # Minimal versions of Python (built without optional dependencies) 102 python3Minimal = 103 (callPackage ./cpython ( 104 { 105 self = __splicedPackages.python3Minimal; 106 inherit passthruFun; 107 pythonAttr = "python3Minimal"; 108 # strip down that python version as much as possible 109 openssl = null; 110 readline = null; 111 ncurses = null; 112 gdbm = null; 113 sqlite = null; 114 tzdata = null; 115 libuuid = null; 116 libffi = libffiBoot; # without test suite 117 stripConfig = true; 118 stripIdlelib = true; 119 stripTests = true; 120 stripTkinter = true; 121 rebuildBytecode = false; 122 stripBytecode = true; 123 includeSiteCustomize = false; 124 enableOptimizations = false; 125 enableLTO = false; 126 mimetypesSupport = false; 127 } 128 // sources.python312 129 )).overrideAttrs 130 (old: { 131 # TODO(@Artturin): Add this to the main cpython expr 132 strictDeps = true; 133 pname = "python3-minimal"; 134 }); 135 136 pypy27 = callPackage ./pypy { 137 self = __splicedPackages.pypy27; 138 sourceVersion = { 139 major = "7"; 140 minor = "3"; 141 patch = "17"; 142 }; 143 144 hash = "sha256-UOBoQPS73pFEgICkEYBoqJuPvK4l/42h4rsUAtyaA0Y="; 145 pythonVersion = "2.7"; 146 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; 147 python = __splicedPackages.pythonInterpreters.pypy27_prebuilt; 148 inherit passthruFun; 149 }; 150 151 pypy310 = callPackage ./pypy { 152 self = __splicedPackages.pypy310; 153 sourceVersion = { 154 major = "7"; 155 minor = "3"; 156 patch = "17"; 157 }; 158 159 hash = "sha256-atdLxXjpxtOoocUVAzEwWOPFjDXfhvdIVFPEvmqyS/c="; 160 pythonVersion = "3.10"; 161 db = db.override { dbmSupport = !stdenv.hostPlatform.isDarwin; }; 162 python = __splicedPackages.pypy27; 163 inherit passthruFun; 164 }; 165 166 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { 167 # Not included at top-level 168 self = __splicedPackages.pythonInterpreters.pypy27_prebuilt; 169 sourceVersion = { 170 major = "7"; 171 minor = "3"; 172 patch = "17"; 173 }; 174 175 hash = 176 { 177 aarch64-linux = "sha256-qN9c4WUPR1aTP4eAhwyRoKQOfJhw10YpvyQTkry1wuM="; 178 x86_64-linux = "sha256-nzSX+HszctF+RHNp4AFqS+yZprTSpZq6d0olv+Q1NHQ="; 179 aarch64-darwin = "sha256-gCJIc5sqzIwb5tlH8Zsy/A44wI4xKzXAXMf7IvEHCeQ="; 180 x86_64-darwin = "sha256-gtRgQhRmyBraSh2Z3y3xuLNTQbOXyF///lGkwwItCDM="; 181 } 182 .${stdenv.system}; 183 pythonVersion = "2.7"; 184 inherit passthruFun; 185 }; 186 187 pypy310_prebuilt = callPackage ./pypy/prebuilt.nix { 188 # Not included at top-level 189 self = __splicedPackages.pythonInterpreters.pypy310_prebuilt; 190 sourceVersion = { 191 major = "7"; 192 minor = "3"; 193 patch = "17"; 194 }; 195 hash = 196 { 197 aarch64-linux = "sha256-v79JVJirwv53G2C/ZOXDwHLgr7z8pprHKCxP9Dd/9BY="; 198 x86_64-linux = "sha256-NA2kGWYGsiRQmhuLMa/SAYE/CCYB3xicE46QXB1g4K8="; 199 aarch64-darwin = "sha256-KPKf/JxcyQbo6QgT/BRPA34js4TwUuGE4kIzL3tgqwY="; 200 x86_64-darwin = "sha256-I/8mS3PlvFt8OhufrHdosj35bH1mDLZBLxxSNSGjNL8="; 201 } 202 .${stdenv.system}; 203 pythonVersion = "3.10"; 204 inherit passthruFun; 205 }; 206 } 207 // lib.optionalAttrs config.allowAliases { 208 pypy39_prebuilt = throw "pypy 3.9 has been removed, use pypy 3.10 instead"; # Added 2025-01-03 209 } 210)