about summary refs log tree commit diff
path: root/pkgs/build-support/rust
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-12-07 04:46:06 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-12-20 20:46:08 +0100
commit8742c0cd2e872ad371759dbf12b32702253fe355 (patch)
tree46f543ba21911e85a4f3f74d0a9f2c89a31497b7 /pkgs/build-support/rust
parent38d1116c183488e92a1b68a5c65d36163ba561b2 (diff)
downloadnixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar.gz
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar.bz2
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar.lz
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar.xz
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.tar.zst
nixlib-8742c0cd2e872ad371759dbf12b32702253fe355.zip
maturinBuildHook: use dist dir relative to cargoRoot
With `cargoRoot` set to a subdirectory of the source, where the
Cargo.{lock,toml} are found, the final mv would previously fail, since
the build results appear relative to cargoRoot, not to the original
build directory.
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r--pkgs/build-support/rust/hooks/maturin-build-hook.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/hooks/maturin-build-hook.sh b/pkgs/build-support/rust/hooks/maturin-build-hook.sh
index d5ff069290ba..028441d18160 100644
--- a/pkgs/build-support/rust/hooks/maturin-build-hook.sh
+++ b/pkgs/build-support/rust/hooks/maturin-build-hook.sh
@@ -25,7 +25,7 @@ maturinBuildHook() {
 
     # Move the wheel to dist/ so that regular Python tooling can find it.
     mkdir -p dist
-    mv target/wheels/*.whl dist/
+    mv ${cargoRoot:+$cargoRoot/}target/wheels/*.whl dist/
 
     # These are python build hooks and may depend on ./dist
     runHook postBuild