From af337a12e6f084556400fa93c71304ad63f1efa6 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 23 Sep 2016 12:41:01 +0300 Subject: Initial commit --- pkgs/check_mdstat/default.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pkgs/check_mdstat/default.nix (limited to 'pkgs/check_mdstat/default.nix') diff --git a/pkgs/check_mdstat/default.nix b/pkgs/check_mdstat/default.nix new file mode 100644 index 0000000..5e645fd --- /dev/null +++ b/pkgs/check_mdstat/default.nix @@ -0,0 +1,26 @@ +{ stdenv, gawk, gnugrep }: + +stdenv.mkDerivation { + name = "check_mdstat"; + src = ./check_mdstat; + outputs = [ "out" "conf" ]; + unpackPhase = ":"; + installPhase = '' + mkdir -p $out/bin + + cp "$src" $out/bin/check_mdstat + + substituteInPlace "$out/bin/"* \ + --replace awk '${gawk}/bin/awk' \ + --replace grep '${gnugrep}/bin/grep' + + chmod +x "$out/bin/"* + + cat < $conf + object CheckCommand "mdstat" { + import "plugin-check-command" + command = [ "$out/bin/check_mdstat" ] + } + CONF + ''; +} -- cgit v1.2.3