27 lines
726 B
Nix
27 lines
726 B
Nix
|
{ stdenv, lib, makeWrapper }:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
name = "checkmk-agent";
|
||
|
src = ./agent.tar.gz;
|
||
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" "wrapPhase" ];
|
||
|
buildInputs = [ ];
|
||
|
nativeBuildInputs = [ makeWrapper ];
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out/bin
|
||
|
install -m 0755 check_mk_agent.linux $out/bin/check_mk_agent
|
||
|
substitute sshwrapper $out/bin/check_mk_agent.sshwrapper \
|
||
|
--replace SUDOCOMMAND "$out/bin/check_mk_agent"
|
||
|
chmod 0755 $out/bin/check_mk_agent.sshwrapper
|
||
|
'';
|
||
|
wrapPhase = ''
|
||
|
wrapProgram $out/bin/check_mk_agent --suffix PATH : /run/current-system/sw/bin
|
||
|
'';
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "checkmk-agent";
|
||
|
platforms = platforms.all;
|
||
|
};
|
||
|
}
|
||
|
|