mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
Automatically move programs in sbin to bin
This should fix the OpenJDK build, which was failing because paxctl is in sbin and therefore not automatically added to $PATH. http://hydra.nixos.org/build/15658346
This commit is contained in:
parent
a85dcf4a00
commit
ab04b7d0bb
19
pkgs/build-support/setup-hooks/move-sbin.sh
Normal file
19
pkgs/build-support/setup-hooks/move-sbin.sh
Normal file
@ -0,0 +1,19 @@
|
||||
# This setup hook, for each output, moves everything in $output/sbin
|
||||
# to $output/bin, and replaces $output/sbin with a symlink to
|
||||
# $output/bin.
|
||||
|
||||
fixupOutputHooks+=(_moveSbin)
|
||||
|
||||
_moveSbin() {
|
||||
if [ "$dontMoveSbin" = 1 ]; then return; fi
|
||||
if ! [ -e "$prefix/sbin" ]; then return; fi
|
||||
echo "moving $prefix/sbin/* to $prefix/bin"
|
||||
mkdir -p $prefix/bin
|
||||
shopt -s dotglob
|
||||
for i in $prefix/sbin/*; do
|
||||
mv "$i" $prefix/bin
|
||||
done
|
||||
shopt -u dotglob
|
||||
rmdir $prefix/sbin
|
||||
ln -s bin $prefix/sbin
|
||||
}
|
@ -44,6 +44,7 @@ let
|
||||
../../build-support/setup-hooks/compress-man-pages.sh
|
||||
../../build-support/setup-hooks/strip.sh
|
||||
../../build-support/setup-hooks/patch-shebangs.sh
|
||||
../../build-support/setup-hooks/move-sbin.sh
|
||||
gcc
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user