python3: splice python within python3Packages.callPackage#245475
python3: splice python within python3Packages.callPackage#245475Artturin merged 1 commit intoNixOS:masterfrom
Conversation
5c8d10d to
c539510
Compare
`lib.extends hooks pythonPackagesFun` includes python which we want to splice what this fixes: ``` nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0 «derivation /nix/store/39dkb51rciw6zwg0c2c44gpmpjapddxc-python3-aarch64-unknown-linux-gnu-3.10.12.drv» ``` to ``` nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0 «derivation /nix/store/21ldw2dp26xvv9iyxn9x77a8yh4waqz5-python3-3.10.12.drv» ``` Before NixOS#194205 The keep python used to work by accident because self was passed from __splicedPackages https://github.com/NixOS/nixpkgs/pull/196052/files#diff-44ce3495c4f983ce64dd47c86a9d3e77bad210b2709c098a3806998dcd9b000bR213 But now it does not work because overrideAttrs is used on python in python-packages-base.nix Preferably we would [ splice the hooks too ](NixOS#228139) but we cannot do that until [Package sets within derivations (i.e. python3.pkgs) are not spliced](NixOS#211340) is fixed, because people often use `python3.pkgs.wrapPython` in `nativeBuildInputs` (it's correct but python3.pkgs should be python3Packages to get splicing.
|
diff of pkgsCross.aarch64-multiplatform.sway` in #228139 without removing this PR has much less diffs |
|
See #228139 for more thoughts and what should really be merged but it breaks some things. |
ghost
left a comment
There was a problem hiding this comment.
Er... splicing, python, and setup-hooks are probably my three least-favorite subjects 😄
I will be honest, I don't fully understand this, mainly because I have actively avoided learning anything about our Python infrastructure. But I think the intersection of people with deep understanding of both nixpkgs cross-compilation and python is basically the singleton set containing this PR's author, so I did my best.
I don't see anything awful in here, and it's a zero-rebuild PR so if it breaks stuff people can throw 💩 at me and we'll just fix it when the time comes.
|
Argh, this breaks #212795 ( I should not have approved this. @Artturin is it okay if I revert this and merge #212795 first? It is more urgent, and has been waiting for a while now. |
|
Ok |
|
Trying to figure out exactly what went wrong here. This helped make things a bit easier to understand: |
|
This makes my brain hurt. I fought valiantly, but did not vanquish our foe. But I think the issue can be narrowed down to: These two uses of |
I'll think about it |
|
Revert was reverted #247245 |

lib.extends hooks pythonPackagesFunincludes python which we want to splicewhat this fixes:
to
Before #194205 The keep python used to work by accident because self was passed from __splicedPackages https://github.com/NixOS/nixpkgs/pull/196052/files#diff-44ce3495c4f983ce64dd47c86a9d3e77bad210b2709c098a3806998dcd9b000bR213 But now it does not work because overrideAttrs is used on python in python-packages-base.nix
Preferably, we splice the hooks too but we cannot do that until Package sets within derivations (i.e. python3.pkgs) are not spliced is fixed, because people often use
python3.pkgs.wrapPythoninnativeBuildInputs(it's correct, but python3.pkgs should be python3Packages to get splicing.Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)