pythonInterpreters: get self from __splicedPackages

BEFORE:

the python derivation did not contain .nativeDrv and .crossDrv because
it was not from the __splicedPackages set

the python used in mk-python-derivation.nix was for host

```
nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs
[ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→
```

AFTER:

the python derivation does contain .nativeDrv and .crossDrv because
it is from the __splicedPackages set

those 2 are what makes nativeBuildInputs and buildInputs function
properly

the python used in mk-python-derivation.nix is for build

```
nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs
[ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→
```

authored by

Artturin and committed by
Frederik Rietdijk
c86122e5 19d04b5f

+16 -16
+16 -16
pkgs/development/interpreters/python/default.nix
··· 1 - { pkgs 2 , callPackage 3 , config 4 , darwin ··· 159 in { 160 161 python27 = callPackage ./cpython/2.7 { 162 - self = pkgs.python27; 163 sourceVersion = { 164 major = "2"; 165 minor = "7"; ··· 172 }; 173 174 python37 = callPackage ./cpython { 175 - self = pkgs.python37; 176 sourceVersion = { 177 major = "3"; 178 minor = "7"; ··· 185 }; 186 187 python38 = callPackage ./cpython { 188 - self = pkgs.python38; 189 sourceVersion = { 190 major = "3"; 191 minor = "8"; ··· 198 }; 199 200 python39 = callPackage ./cpython ({ 201 - self = pkgs.python39; 202 inherit (darwin) configd; 203 inherit passthruFun; 204 } // sources.python39); 205 206 python310 = callPackage ./cpython ({ 207 - self = pkgs.python310; 208 inherit (darwin) configd; 209 inherit passthruFun; 210 } // sources.python310); 211 212 python311 = callPackage ./cpython { 213 - self = pkgs.python311; 214 sourceVersion = { 215 major = "3"; 216 minor = "11"; ··· 224 225 # Minimal versions of Python (built without optional dependencies) 226 python3Minimal = (callPackage ./cpython ({ 227 - self = pkgs.python3Minimal; 228 inherit passthruFun; 229 pythonAttr = "python3Minimal"; 230 # strip down that python version as much as possible ··· 253 }); 254 255 pypy27 = callPackage ./pypy { 256 - self = pkgs.pypy27; 257 sourceVersion = { 258 major = "7"; 259 minor = "3"; ··· 262 sha256 = "sha256-wERP2YcwWMHA2Z4TqTTpIoXLBZksmWi/Ujwyv5vsCp0="; 263 pythonVersion = "2.7"; 264 db = db.override { dbmSupport = !stdenv.isDarwin; }; 265 - python = pkgs.python27; 266 inherit passthruFun; 267 inherit (darwin) libunwind; 268 inherit (darwin.apple_sdk.frameworks) Security; 269 }; 270 271 pypy38 = callPackage ./pypy { 272 - self = pkgs.pypy38; 273 sourceVersion = { 274 major = "7"; 275 minor = "3"; ··· 278 sha256 = "sha256-Ia4zn09QFtbKcwAwXz47VUNzg1yzw5qQQf4w5oEcgMY="; 279 pythonVersion = "3.8"; 280 db = db.override { dbmSupport = !stdenv.isDarwin; }; 281 - python = pkgs.python27; 282 inherit passthruFun; 283 inherit (darwin) libunwind; 284 inherit (darwin.apple_sdk.frameworks) Security; 285 }; 286 - pypy37 = pkgs.pypy38.override { 287 - self = pkgs.pythonInterpreters.pypy37; 288 pythonVersion = "3.7"; 289 sha256 = "sha256-LtAqyecQhZxBvILer7CGGXkruaJ+6qFnbHQe3t0hTdc="; 290 }; 291 292 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { 293 # Not included at top-level 294 - self = pkgs.pythonInterpreters.pypy27_prebuilt; 295 sourceVersion = { 296 major = "7"; 297 minor = "3"; ··· 304 305 pypy38_prebuilt = callPackage ./pypy/prebuilt.nix { 306 # Not included at top-level 307 - self = pkgs.pythonInterpreters.pypy38_prebuilt; 308 sourceVersion = { 309 major = "7"; 310 minor = "3";
··· 1 + { __splicedPackages 2 , callPackage 3 , config 4 , darwin ··· 159 in { 160 161 python27 = callPackage ./cpython/2.7 { 162 + self = __splicedPackages.python27; 163 sourceVersion = { 164 major = "2"; 165 minor = "7"; ··· 172 }; 173 174 python37 = callPackage ./cpython { 175 + self = __splicedPackages.python37; 176 sourceVersion = { 177 major = "3"; 178 minor = "7"; ··· 185 }; 186 187 python38 = callPackage ./cpython { 188 + self = __splicedPackages.python38; 189 sourceVersion = { 190 major = "3"; 191 minor = "8"; ··· 198 }; 199 200 python39 = callPackage ./cpython ({ 201 + self = __splicedPackages.python39; 202 inherit (darwin) configd; 203 inherit passthruFun; 204 } // sources.python39); 205 206 python310 = callPackage ./cpython ({ 207 + self = __splicedPackages.python310; 208 inherit (darwin) configd; 209 inherit passthruFun; 210 } // sources.python310); 211 212 python311 = callPackage ./cpython { 213 + self = __splicedPackages.python311; 214 sourceVersion = { 215 major = "3"; 216 minor = "11"; ··· 224 225 # Minimal versions of Python (built without optional dependencies) 226 python3Minimal = (callPackage ./cpython ({ 227 + self = __splicedPackages.python3Minimal; 228 inherit passthruFun; 229 pythonAttr = "python3Minimal"; 230 # strip down that python version as much as possible ··· 253 }); 254 255 pypy27 = callPackage ./pypy { 256 + self = __splicedPackages.pypy27; 257 sourceVersion = { 258 major = "7"; 259 minor = "3"; ··· 262 sha256 = "sha256-wERP2YcwWMHA2Z4TqTTpIoXLBZksmWi/Ujwyv5vsCp0="; 263 pythonVersion = "2.7"; 264 db = db.override { dbmSupport = !stdenv.isDarwin; }; 265 + python = __splicedPackages.python27; 266 inherit passthruFun; 267 inherit (darwin) libunwind; 268 inherit (darwin.apple_sdk.frameworks) Security; 269 }; 270 271 pypy38 = callPackage ./pypy { 272 + self = __splicedPackages.pypy38; 273 sourceVersion = { 274 major = "7"; 275 minor = "3"; ··· 278 sha256 = "sha256-Ia4zn09QFtbKcwAwXz47VUNzg1yzw5qQQf4w5oEcgMY="; 279 pythonVersion = "3.8"; 280 db = db.override { dbmSupport = !stdenv.isDarwin; }; 281 + python = __splicedPackages.python27; 282 inherit passthruFun; 283 inherit (darwin) libunwind; 284 inherit (darwin.apple_sdk.frameworks) Security; 285 }; 286 + pypy37 = __splicedPackages.pypy38.override { 287 + self = __splicedPackages.pythonInterpreters.pypy37; 288 pythonVersion = "3.7"; 289 sha256 = "sha256-LtAqyecQhZxBvILer7CGGXkruaJ+6qFnbHQe3t0hTdc="; 290 }; 291 292 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { 293 # Not included at top-level 294 + self = __splicedPackages.pythonInterpreters.pypy27_prebuilt; 295 sourceVersion = { 296 major = "7"; 297 minor = "3"; ··· 304 305 pypy38_prebuilt = callPackage ./pypy/prebuilt.nix { 306 # Not included at top-level 307 + self = __splicedPackages.pythonInterpreters.pypy38_prebuilt; 308 sourceVersion = { 309 major = "7"; 310 minor = "3";