vimPlugins.blink-cmp: 0.7.3 -> 0.7.6 (#364100)
[NixPkgs.git] / pkgs / build-support / setup-hooks / move-lib64.sh
blob9517af797323d13e17c0b08f1227c9c0f389c657
1 # This setup hook, for each output, moves everything in $output/lib64
2 # to $output/lib, and replaces $output/lib64 with a symlink to
3 # $output/lib. The rationale is that lib64 directories are unnecessary
4 # in Nix (since 32-bit and 64-bit builds of a package are in different
5 # store paths anyway).
6 # If the move would overwrite anything, it should fail on rmdir.
8 fixupOutputHooks+=(_moveLib64)
10 _moveLib64() {
11 if [ "${dontMoveLib64-}" = 1 ]; then return; fi
12 if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then return; fi
13 echo "moving $prefix/lib64/* to $prefix/lib"
14 mkdir -p $prefix/lib
15 shopt -s dotglob
16 for i in $prefix/lib64/*; do
17 mv --no-clobber "$i" $prefix/lib
18 done
19 shopt -u dotglob
20 rmdir $prefix/lib64
21 ln -s lib $prefix/lib64