Nixpkgs version
Describe the bug
When using multiple of pythonOnBuildForBuild, pythonOnBuildForHost, pythonOnBuildForTarget, pythonOnHostForHost, pythonOnTargetForTarget in sequence, they do not compose as expected.
Steps to reproduce
Run nix repl --expr 'import ./. { localSystem = "x86_64-linux"; crossSystem = "aarch64-linux"; }' in a current nixpkgs unstable. Try to compose the python splices:
nix-repl> buildPackages.python3.pythonOnBuildForHost.pythonOnTargetForTarget
«derivation /nix/store/7a8v3c2rwa5k503d71yl8xpnal0b9wam-python3-aarch64-unknown-linux-gnu-3.13.11.drv»
nix-repl> buildPackages.python3.pythonOnTargetForTarget
«derivation /nix/store/7a8v3c2rwa5k503d71yl8xpnal0b9wam-python3-aarch64-unknown-linux-gnu-3.13.11.drv»
nix-repl> buildPackages.buildPackages.python3.pythonOnTargetForTarget
«derivation /nix/store/2s2zik6gyc4s3pf1nm7lbfii8699dsab-python3-3.13.11.drv»
Observe that the composition doesn't work: the first line gives the same result as the second line.
Expected behaviour
Composition works: the first line gives the same result as the third line.
Screenshots
No response
Relevant log output
Additional context
Due to their usage in splicing (
|
otherSplices = { |
|
selfBuildBuild = pythonOnBuildForBuild.pkgs; |
|
selfBuildHost = pythonOnBuildForHost.pkgs; |
|
selfBuildTarget = pythonOnBuildForTarget.pkgs; |
|
selfHostHost = pythonOnHostForHost.pkgs; |
|
selfTargetTarget = pythonOnTargetForTarget.pkgs or { }; # There is no Python TargetTarget. |
|
}; |
), the incorrect composition of Python splices will cause
setuptools-rust to receive the wrong
pythonOnTargetForTarget (
|
pyLibDir = "${python.pythonOnTargetForTarget}/lib/${python.pythonOnTargetForTarget.libPrefix}"; |
), breaking builds of dependents such as
buildPackages.python3Packages.bcrypt and in turn the cross-compiled
lix.
Another Python splicing issue is known (#211340) but I believe this one is a separate bug.
System metadata
- system:
"x86_64-linux"
- host os:
Linux 6.18.2, NixOS, 26.05 (Yarara), 26.05pre921484.fb7944c166a3
- multi-user?:
yes
- sandbox:
yes
- version:
nix-env (Lix, like Nix) 2.95.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: [elided] Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/icvwjyw1hk7wjn4w4gr9ap1whnrrrvxh-lix-2.95.0-pre-d387c9113c73/share
- nixpkgs:
/nix/store/59b0b5ajzxqh7b9dhq2bi4s79kgg7hxz-nixpkgs
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Nixpkgs version
Describe the bug
When using multiple of
pythonOnBuildForBuild,pythonOnBuildForHost,pythonOnBuildForTarget,pythonOnHostForHost,pythonOnTargetForTargetin sequence, they do not compose as expected.Steps to reproduce
Run
nix repl --expr 'import ./. { localSystem = "x86_64-linux"; crossSystem = "aarch64-linux"; }'in a current nixpkgs unstable. Try to compose the python splices:Observe that the composition doesn't work: the first line gives the same result as the second line.
Expected behaviour
Composition works: the first line gives the same result as the third line.
Screenshots
No response
Relevant log output
Additional context
Due to their usage in splicing (
nixpkgs/pkgs/development/interpreters/python/passthrufun.nix
Lines 71 to 77 in 82f1d9b
setuptools-rustto receive the wrongpythonOnTargetForTarget(nixpkgs/pkgs/development/python-modules/setuptools-rust/default.nix
Line 57 in a1b83f9
buildPackages.python3Packages.bcryptand in turn the cross-compiledlix.Another Python splicing issue is known (#211340) but I believe this one is a separate bug.
System metadata
"x86_64-linux"Linux 6.18.2, NixOS, 26.05 (Yarara), 26.05pre921484.fb7944c166a3yesyesnix-env (Lix, like Nix) 2.95.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: [elided] Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/icvwjyw1hk7wjn4w4gr9ap1whnrrrvxh-lix-2.95.0-pre-d387c9113c73/share/nix/store/59b0b5ajzxqh7b9dhq2bi4s79kgg7hxz-nixpkgsNotify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.