summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/move-lib64.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/move-lib64.sh b/pkgs/build-support/setup-hooks/move-lib64.sh
index 46c90fcea6bd..7724be369c9c 100644
--- a/pkgs/build-support/setup-hooks/move-lib64.sh
+++ b/pkgs/build-support/setup-hooks/move-lib64.sh
@@ -3,6 +3,7 @@
 # $output/lib. The rationale is that lib64 directories are unnecessary
 # in Nix (since 32-bit and 64-bit builds of a package are in different
 # store paths anyway).
+# If the move would overwrite anything, it should fail on rmdir.
 
 fixupOutputHooks+=(_moveLib64)
 
@@ -13,7 +14,7 @@ _moveLib64() {
     mkdir -p $prefix/lib
     shopt -s dotglob
     for i in $prefix/lib64/*; do
-        mv "$i" $prefix/lib
+        mv --no-clobber "$i" $prefix/lib
     done
     shopt -u dotglob
     rmdir $prefix/lib64