From 2c99a203c7b7a7e03882dd3ce39334f02c3632e1 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sun, 30 Aug 2020 22:17:19 +0900 Subject: [PATCH] mackerel-agent: init at 0.69.3 --- .../monitoring/mackerel-agent/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/servers/monitoring/mackerel-agent/default.nix diff --git a/pkgs/servers/monitoring/mackerel-agent/default.nix b/pkgs/servers/monitoring/mackerel-agent/default.nix new file mode 100644 index 000000000000..c5548fafd348 --- /dev/null +++ b/pkgs/servers/monitoring/mackerel-agent/default.nix @@ -0,0 +1,42 @@ +{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, iproute, nettools }: + +buildGoModule rec { + pname = "mackerel-agent"; + version = "0.69.3"; + + src = fetchFromGitHub { + owner = "mackerelio"; + repo = pname; + rev = "v${version}"; + sha256 = "0jkvqqzk6wyjsdsmn2l2cdw8pjqzswlqb9p492czhgrfy065lrqp"; + }; + + nativeBuildInputs = [ makeWrapper ]; + checkInputs = lib.optionals (!stdenv.isDarwin) [ nettools ]; + buildInputs = lib.optionals (!stdenv.isDarwin) [ iproute ]; + + vendorSha256 = "0kjky2mhs6dapnr4xpjpnbibp6y8r320igddplynsfsp8vwrfp7m"; + + subPackages = [ "." ]; + + buildFlagsArray = '' + -ldflags= + -X=main.version=${version} + -X=main.gitcommit=v${version} + ''; + + postInstall = '' + wrapProgram $out/bin/mackerel-agent \ + --prefix PATH : "${lib.makeBinPath buildInputs}" + ''; + + doCheck = true; + + meta = with lib; { + description = "System monitoring service for mackerel.io"; + homepage = "https://github.com/mackerelio/mackerel-agent"; + license = licenses.asl20; + maintainers = with maintainers; [ midchildan ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28ce443ead31..3d7a307c79c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16813,6 +16813,8 @@ in labelImg = callPackage ../applications/science/machine-learning/labelimg { }; + mackerel-agent = callPackage ../servers/monitoring/mackerel-agent { }; + mailman = callPackage ../servers/mail/mailman/wrapped.nix { }; mailman-rss = callPackage ../development/python-modules/mailman-rss { };