pythonInterpreters: don't use with pkgs

authored by

Artturin and committed by
Frederik Rietdijk
19d04b5f 9259c4b8

+31 -22
+31 -22
pkgs/development/interpreters/python/default.nix
··· 1 - { pkgs }: 2 - 3 - with pkgs; 1 + { pkgs 2 + , callPackage 3 + , config 4 + , darwin 5 + , db 6 + , lib 7 + , libffiBoot 8 + , newScope 9 + , pythonPackagesExtensions 10 + , splicePackages 11 + , stdenv 12 + }: 4 13 5 14 (let 6 15 ··· 79 88 extra = _: {}; 80 89 optionalExtensions = cond: as: if cond then as else []; 81 90 python2Extension = import ../../../top-level/python2-packages.nix; 82 - extensions = lib.composeManyExtensions ((optionalExtensions (!self.isPy3k) [python2Extension]) ++ pkgs.pythonPackagesExtensions ++ [ overrides ]); 91 + extensions = lib.composeManyExtensions ((optionalExtensions (!self.isPy3k) [python2Extension]) ++ pythonPackagesExtensions ++ [ overrides ]); 83 92 aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super); 84 93 in lib.makeScopeWithSplicing 85 - pkgs.splicePackages 86 - pkgs.newScope 94 + splicePackages 95 + newScope 87 96 otherSplices 88 97 keep 89 98 extra ··· 150 159 in { 151 160 152 161 python27 = callPackage ./cpython/2.7 { 153 - self = python27; 162 + self = pkgs.python27; 154 163 sourceVersion = { 155 164 major = "2"; 156 165 minor = "7"; ··· 163 172 }; 164 173 165 174 python37 = callPackage ./cpython { 166 - self = python37; 175 + self = pkgs.python37; 167 176 sourceVersion = { 168 177 major = "3"; 169 178 minor = "7"; ··· 176 185 }; 177 186 178 187 python38 = callPackage ./cpython { 179 - self = python38; 188 + self = pkgs.python38; 180 189 sourceVersion = { 181 190 major = "3"; 182 191 minor = "8"; ··· 189 198 }; 190 199 191 200 python39 = callPackage ./cpython ({ 192 - self = python39; 201 + self = pkgs.python39; 193 202 inherit (darwin) configd; 194 203 inherit passthruFun; 195 204 } // sources.python39); 196 205 197 206 python310 = callPackage ./cpython ({ 198 - self = python310; 207 + self = pkgs.python310; 199 208 inherit (darwin) configd; 200 209 inherit passthruFun; 201 210 } // sources.python310); 202 211 203 212 python311 = callPackage ./cpython { 204 - self = python311; 213 + self = pkgs.python311; 205 214 sourceVersion = { 206 215 major = "3"; 207 216 minor = "11"; ··· 215 224 216 225 # Minimal versions of Python (built without optional dependencies) 217 226 python3Minimal = (callPackage ./cpython ({ 218 - self = python3Minimal; 227 + self = pkgs.python3Minimal; 219 228 inherit passthruFun; 220 229 pythonAttr = "python3Minimal"; 221 230 # strip down that python version as much as possible ··· 226 235 sqlite = null; 227 236 configd = null; 228 237 tzdata = null; 229 - libffi = pkgs.libffiBoot; # without test suite 238 + libffi = libffiBoot; # without test suite 230 239 stripConfig = true; 231 240 stripIdlelib = true; 232 241 stripTests = true; ··· 244 253 }); 245 254 246 255 pypy27 = callPackage ./pypy { 247 - self = pypy27; 256 + self = pkgs.pypy27; 248 257 sourceVersion = { 249 258 major = "7"; 250 259 minor = "3"; ··· 253 262 sha256 = "sha256-wERP2YcwWMHA2Z4TqTTpIoXLBZksmWi/Ujwyv5vsCp0="; 254 263 pythonVersion = "2.7"; 255 264 db = db.override { dbmSupport = !stdenv.isDarwin; }; 256 - python = python27; 265 + python = pkgs.python27; 257 266 inherit passthruFun; 258 267 inherit (darwin) libunwind; 259 268 inherit (darwin.apple_sdk.frameworks) Security; 260 269 }; 261 270 262 271 pypy38 = callPackage ./pypy { 263 - self = pypy38; 272 + self = pkgs.pypy38; 264 273 sourceVersion = { 265 274 major = "7"; 266 275 minor = "3"; ··· 269 278 sha256 = "sha256-Ia4zn09QFtbKcwAwXz47VUNzg1yzw5qQQf4w5oEcgMY="; 270 279 pythonVersion = "3.8"; 271 280 db = db.override { dbmSupport = !stdenv.isDarwin; }; 272 - python = python27; 281 + python = pkgs.python27; 273 282 inherit passthruFun; 274 283 inherit (darwin) libunwind; 275 284 inherit (darwin.apple_sdk.frameworks) Security; 276 285 }; 277 - pypy37 = pypy38.override { 278 - self = pythonInterpreters.pypy37; 286 + pypy37 = pkgs.pypy38.override { 287 + self = pkgs.pythonInterpreters.pypy37; 279 288 pythonVersion = "3.7"; 280 289 sha256 = "sha256-LtAqyecQhZxBvILer7CGGXkruaJ+6qFnbHQe3t0hTdc="; 281 290 }; 282 291 283 292 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { 284 293 # Not included at top-level 285 - self = pythonInterpreters.pypy27_prebuilt; 294 + self = pkgs.pythonInterpreters.pypy27_prebuilt; 286 295 sourceVersion = { 287 296 major = "7"; 288 297 minor = "3"; ··· 295 304 296 305 pypy38_prebuilt = callPackage ./pypy/prebuilt.nix { 297 306 # Not included at top-level 298 - self = pythonInterpreters.pypy38_prebuilt; 307 + self = pkgs.pythonInterpreters.pypy38_prebuilt; 299 308 sourceVersion = { 300 309 major = "7"; 301 310 minor = "3";