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→
```
This commit is contained in:
Artturin 2022-10-15 04:47:23 +03:00 committed by Frederik Rietdijk
parent 19d04b5f47
commit c86122e5bd

View file

@ -1,4 +1,4 @@
{ pkgs
{ __splicedPackages
, callPackage
, config
, darwin
@ -159,7 +159,7 @@
in {
python27 = callPackage ./cpython/2.7 {
self = pkgs.python27;
self = __splicedPackages.python27;
sourceVersion = {
major = "2";
minor = "7";
@ -172,7 +172,7 @@ in {
};
python37 = callPackage ./cpython {
self = pkgs.python37;
self = __splicedPackages.python37;
sourceVersion = {
major = "3";
minor = "7";
@ -185,7 +185,7 @@ in {
};
python38 = callPackage ./cpython {
self = pkgs.python38;
self = __splicedPackages.python38;
sourceVersion = {
major = "3";
minor = "8";
@ -198,19 +198,19 @@ in {
};
python39 = callPackage ./cpython ({
self = pkgs.python39;
self = __splicedPackages.python39;
inherit (darwin) configd;
inherit passthruFun;
} // sources.python39);
python310 = callPackage ./cpython ({
self = pkgs.python310;
self = __splicedPackages.python310;
inherit (darwin) configd;
inherit passthruFun;
} // sources.python310);
python311 = callPackage ./cpython {
self = pkgs.python311;
self = __splicedPackages.python311;
sourceVersion = {
major = "3";
minor = "11";
@ -224,7 +224,7 @@ in {
# Minimal versions of Python (built without optional dependencies)
python3Minimal = (callPackage ./cpython ({
self = pkgs.python3Minimal;
self = __splicedPackages.python3Minimal;
inherit passthruFun;
pythonAttr = "python3Minimal";
# strip down that python version as much as possible
@ -253,7 +253,7 @@ in {
});
pypy27 = callPackage ./pypy {
self = pkgs.pypy27;
self = __splicedPackages.pypy27;
sourceVersion = {
major = "7";
minor = "3";
@ -262,14 +262,14 @@ in {
sha256 = "sha256-wERP2YcwWMHA2Z4TqTTpIoXLBZksmWi/Ujwyv5vsCp0=";
pythonVersion = "2.7";
db = db.override { dbmSupport = !stdenv.isDarwin; };
python = pkgs.python27;
python = __splicedPackages.python27;
inherit passthruFun;
inherit (darwin) libunwind;
inherit (darwin.apple_sdk.frameworks) Security;
};
pypy38 = callPackage ./pypy {
self = pkgs.pypy38;
self = __splicedPackages.pypy38;
sourceVersion = {
major = "7";
minor = "3";
@ -278,20 +278,20 @@ in {
sha256 = "sha256-Ia4zn09QFtbKcwAwXz47VUNzg1yzw5qQQf4w5oEcgMY=";
pythonVersion = "3.8";
db = db.override { dbmSupport = !stdenv.isDarwin; };
python = pkgs.python27;
python = __splicedPackages.python27;
inherit passthruFun;
inherit (darwin) libunwind;
inherit (darwin.apple_sdk.frameworks) Security;
};
pypy37 = pkgs.pypy38.override {
self = pkgs.pythonInterpreters.pypy37;
pypy37 = __splicedPackages.pypy38.override {
self = __splicedPackages.pythonInterpreters.pypy37;
pythonVersion = "3.7";
sha256 = "sha256-LtAqyecQhZxBvILer7CGGXkruaJ+6qFnbHQe3t0hTdc=";
};
pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix {
# Not included at top-level
self = pkgs.pythonInterpreters.pypy27_prebuilt;
self = __splicedPackages.pythonInterpreters.pypy27_prebuilt;
sourceVersion = {
major = "7";
minor = "3";
@ -304,7 +304,7 @@ in {
pypy38_prebuilt = callPackage ./pypy/prebuilt.nix {
# Not included at top-level
self = pkgs.pythonInterpreters.pypy38_prebuilt;
self = __splicedPackages.pythonInterpreters.pypy38_prebuilt;
sourceVersion = {
major = "7";
minor = "3";