Loading
python3Packages.setuptools-rust: fix cross build for all `setuptools-rust` based packages
Prior to this change all python packages using `setuptools-rust` were broken when cross compiled as they built binaries for the build platform instead of for the host platform. The setuptoolsRustBuildHook hook would have to be included as a native build input instead of the `setuptools-rust` package, but practically wasn't used anywhere. This change makes it so that `setuptoolsRustBuildHook` becomes unnecessary, and instead `setuptools-rust` propagates a setup-hook directly setting up the build environment, similar to how cmake does it when included via nativeBuildInputs. This change fixes cross on all packages using `setuptools-rust` as a build-system.