NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.35k stars 13.59k forks source link

Splicing of hooks is broken in mkPythonDerivation #271796

Open eryngion opened 9 months ago

eryngion commented 9 months ago

Describe the bug

Various hooks that are put in nativeBuildInputs of a python package by mkPythonDerivation/buildPythonPackage don't get shifted to buildPlatform.

Steps To Reproduce

Steps to reproduce the behavior:

nix-repl> u = import <nixos-unstable> {system =  "x86_64-linux"; crossSystem="aarch64-linux";}

nix-repl> testPythonPackage = u.__splicedPackages.python311Packages.buildPythonPackage {name = "ttt";}

nix-repl> python = builtins.elemAt testPythonPackage.nativeBuildInputs 0

nix-repl> python.stdenv.hostPlatform.system
"x86_64-linux"

nix-repl> hook = builtins.elemAt testPythonPackage.nativeBuildInputs 1                                 

nix-repl> hook.stdenv.hostPlatform.system                              
"aarch64-linux"

Expected behavior

hook.stdenv.hostPlatform.system should also be "x86_64-linux"

eryngion commented 9 months ago

Should be fixed by #228139