summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-httpserver
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-01-26 16:19:05 +0100
committerKarel Kočí <cynerd@email.cz>2023-06-30 14:52:25 +0200
commit9d663f7fcd1fbae2c1895151d8a98234593a6d39 (patch)
tree9f5a4645a66b52062229a76ee84128e4142ba269 /pkgs/development/python-modules/pytest-httpserver
parentc3cfd4a6c8bd70f2581b7b1c625cf01629631c07 (diff)
setuptools-rust: fix cross compilation
The setuptools-rust requires some environment variables to really perform cross build, otherwise it just builds for build platform. This adds setup hook that introduces these environment variables. There are three variables. The PYO3_CROSS_LIB_DIR has to point to the target's Python library directory. This has to be directory for the target not for the build or host. We have to choose the correct target Python. I am unsure how to do that simply in nixpkgs and this this implementations just delays this and waits for the correct Python when package using this hook is build. The CARGO_BUILD_TARGET triggers cross compilation in setuptools-rust. This is simply the Rust target specification. The CARGO_TARGET_*_LINKER variable should not be essentially required but setuptools-rust probably mangles the Rust build environment somewhat and that results to the missing linker. By explicitly specifying it using the environment variable we force the correct linker.
Diffstat (limited to 'pkgs/development/python-modules/pytest-httpserver')
0 files changed, 0 insertions, 0 deletions