From 412cb5a3a2415fa0343f5689c9f42a87548c7b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 3 Jan 2015 16:27:16 +0100 Subject: [PATCH] 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.) --- pkgs/servers/monitoring/munin/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix index 4d3065b6542c..51eda757e3c2 100644 --- a/pkgs/servers/monitoring/munin/default.nix +++ b/pkgs/servers/monitoring/munin/default.nix @@ -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