munin: add 'bc' (needed by 'acpi' and 'snort_pkts' plugins)

This commit is contained in:
Bjørn Forsman 2017-02-25 14:10:09 +01:00
parent 56a4640b0c
commit 46e44222d6
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
, python, ruby, jre, nettools
, python, ruby, jre, nettools, bc
}:
stdenv.mkDerivation rec {
@ -99,7 +99,8 @@ 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"
find "$out/lib/plugins" -type f -print0 | xargs -0 -L1 \
sed -i -e "s|/usr/bin/||g" -e "s|/usr/sbin/||g" -e "s|\<bc\>|${bc}/bin/bc|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