Merge pull request #62880 from thefloweringash/sensu-go

sensu-go: init at 5.9.0
This commit is contained in:
Mario Rodas 2019-06-09 10:51:09 -05:00 committed by GitHub
commit 509b62bf67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 0 deletions

View File

@ -5071,6 +5071,11 @@
github = "thedavidmeister";
name = "David Meister";
};
thefloweringash = {
email = "lorne@cons.org.nz";
github = "thefloweringash";
name = "Andrew Childs";
};
thesola10 = {
email = "thesola10@bobile.fr";
github = "thesola10";

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

@ -14749,6 +14749,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 {