munin: remove /usr/{bin,sbin}/ references from plugins

Instead, run things out of $PATH.

Fixes errors like these (on NixOS):
  munin-available-plugins/.mysql_slowqueries-wrapped: line 67: /usr/bin/printf: No such file or directory

(Basically, this unbreaks some plugins.)
This commit is contained in:
Bjørn Forsman 2015-01-03 16:27:16 +01:00
parent 02458a939a
commit 412cb5a3a2

View file

@ -96,6 +96,9 @@ stdenv.mkDerivation rec {
'';
postFixup = ''
echo "Removing references to /usr/{bin,sbin}/ from munin plugins..."
find "$out/lib/plugins" -type f -print0 | xargs -0 -L1 sed -i -e "s|/usr/bin/||g" -e "s|/usr/sbin/||g"
if test -e $out/nix-support/propagated-native-build-inputs; then
ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
fi