New comment by ahesford on void-packages repository https://github.com/void-linux/void-packages/pull/28595#issuecomment-775393349 Comment: If `setuptools_rust` upstream rejects the patch to honor RUSTFLAGS in the environment, either we patch anyway or we work around its tendency to overwrite that variable by wrapping `cargo` for cross builds of `python3-cryptography`: ```bash pre_configure() { if [ "$CROSS_BUILD" ]; then cat > ${XBPS_WRAPPERDIR}/cargo <<-EOF #!/bin/bash if [[ ! "\$RUSTFLAGS" =~ "--sysroot" ]]; then export RUSTFLAGS="\$RUSTFLAGS --sysroot=${XBPS_CROSS_BASE}/usr" fi exec /usr/bin/cargo "\$@" EOF chmod 755 ${XBPS_WRAPPERDIR}/cargo fi } ```