summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httpserver
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2025-01-01 02:40:34 +0700
committerDavHau <hsngrmpf+github@gmail.com>2025-01-31 18:18:46 +0700
commitdb4cf6cb1dd04630efa35706050884d18a700374 (patch)
treeb9e4a75fcdc849a61211f7e6e7f3e20846fa02ec /pkgs/development/python-modules/httpserver
parent4e54dd0c519c6f5d0101de9e01f719e3ac16820a (diff)
rust: fix splicing for rust hooks
This fixes a long standing issue where rust hooks behave differently when used inside buildRustPackage vs inside mkDerivation, which lead to surprising behavior, like for example the package being built for the wrong paltform or the linker not being found especially in cross compilation scenarios. The reason for this inconsitency was, that buildRustPackage consumed the hooks in a non-spliced form, via [this inherit statement](https://github.com/NixOS/nixpkgs/blob/4506ece030a0c82d078edd0360ea8af6b4d94035/pkgs/development/compilers/rust/make-rust-platform.nix#L60), and therefore the usual platform shift on the hooks introduced by putting them in `nativeBuildInputs` was not applied here. Thoug whenever the hook was used inside other builders like `mkDerivation` the platform shift did apply correctly as the hook was consumed via the spliced package set, introducing the inconsitecy. Because of the wrong (non-spliced) use in buildRustPackage, most rust hooks have been designed with the wrong build/host/target shift in mind which is fixed by this change. Due to the inconsitent behavior between different builders, workarounds like `rust.envVars`, which were previously introduced, likely become obsolete by this change. This likely fixes a bunch of cross compilation issues for rust packages that are not based on `buildRustPackage` but instead consume the hooks directly. Done: - ensure that `buildRustPackage` consumes spliced hooks by using makeScopeWithSplicing' in make-rust-platform.nix. - refactor hooks to make them refer to correct build/host/target packages. - remove `rust.envVars` workaround from all rust hooks - implement tests for most rust hooks in /pkgs/test/rut-hooks The newly added tests can be executed for native as well as cross compilation via: ``` nix-build -A tests.rust-hooks -A pkgsCross.riscv64.tests.rust-hooks ```
Diffstat (limited to 'pkgs/development/python-modules/httpserver')
0 files changed, 0 insertions, 0 deletions