1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "do-agent";
9 version = "3.18.2";
10
11 src = fetchFromGitHub {
12 owner = "digitalocean";
13 repo = "do-agent";
14 rev = version;
15 sha256 = "sha256-+UoQhJkwxazfe6LwqNF4zn4jnc3ZQia0ZOL3GX27r3w=";
16 };
17
18 ldflags = [
19 "-X main.version=${version}"
20 ];
21
22 vendorHash = null;
23
24 doCheck = false;
25
26 postInstall = ''
27 install -Dm444 -t $out/lib/systemd/system $src/packaging/etc/systemd/system/do-agent.service
28 '';
29
30 meta = with lib; {
31 description = "DigitalOcean droplet system metrics agent";
32 mainProgram = "do-agent";
33 longDescription = ''
34 do-agent is a program provided by DigitalOcean that collects system
35 metrics from a DigitalOcean Droplet (on which the program runs) and sends
36 them to DigitalOcean to provide resource usage graphs and alerting.
37 '';
38 homepage = "https://github.com/digitalocean/do-agent";
39 license = licenses.asl20;
40 maintainers = [ ];
41 platforms = platforms.linux;
42 };
43}