sensu-go: init at 5.9.0

This commit is contained in:
Andrew Childs 2019-06-09 22:29:49 +09:00
parent 813a2cd2fe
commit a756a69ce4
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ buildGoPackage, fetchFromGitHub, lib }:
let
generic = { subPackages, pname, postInstall ? "" }:
buildGoPackage rec {
inherit pname;
version = "5.9.0";
shortRev = "078f625"; # for internal version info
goPackagePath = "github.com/sensu/sensu-go";
src = fetchFromGitHub {
owner = "sensu";
repo = "sensu-go";
rev = version;
sha256 = "1rivnq7m4p44zz1fl46j06aakb0yjsjb3mjqyfq4r0235xr01ajw";
};
inherit subPackages postInstall;
buildFlagsArray = let
versionPkg = "github.com/sensu/sensu-go/version";
in ''
-ldflags=
-X ${versionPkg}.Version=${version}
-X ${versionPkg}.BuildSHA=${shortRev}
'';
meta = {
homepage = https://sensu.io;
description = "Open source monitoring tool for ephemeral infrastructure & distributed applications";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ thefloweringash ];
};
};
in
{
sensu-go-cli = generic {
pname = "sensu-go-cli";
subPackages = [ "cmd/sensuctl" ];
postInstall = ''
mkdir -p \
"''${!outputBin}/share/bash-completion/completions" \
"''${!outputBin}/share/zsh/site-functions"
''${!outputBin}/bin/sensuctl completion bash > ''${!outputBin}/share/bash-completion/completions/sensuctl
''${!outputBin}/bin/sensuctl completion zsh > ''${!outputBin}/share/zsh/site-functions/_sensuctl
'';
};
sensu-go-backend = generic {
pname = "sensu-go-backend";
subPackages = [ "cmd/sensu-backend" ];
};
sensu-go-agent = generic {
pname = "sensu-go-agent";
subPackages = [ "cmd/sensu-agent" ];
};
}

View File

@ -14747,6 +14747,11 @@ in
sensu = callPackage ../servers/monitoring/sensu { };
inherit (callPackages ../servers/monitoring/sensu-go { })
sensu-go-agent
sensu-go-backend
sensu-go-cli;
uchiwa = callPackage ../servers/monitoring/uchiwa { };
shishi = callPackage ../servers/shishi {