Files

38 lines
885 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
systemdLibs,
}:
buildGoModule (finalAttrs: {
pname = "coroot-node-agent";
version = "1.32.0";
src = fetchFromGitHub {
owner = "coroot";
repo = "coroot-node-agent";
rev = "v${finalAttrs.version}";
hash = "sha256-qrIcbJcxVw6LgvpihFlDP3AYT0S5ILHJf+pko94t3/8=";
};
vendorHash = "sha256-I7KxBM3cLF4zrZb6AQSCmg3cR1MrTPzTNHUHN9YP3P0=";
buildInputs = [ systemdLibs ];
env.CGO_CFLAGS = "-I ${systemdLibs}/include";
ldflags = [
"-extldflags='-Wl,-z,lazy'"
"-X 'github.com/coroot/coroot-node-agent/flags.Version=${finalAttrs.version}'"
];
meta = {
description = "Prometheus exporter based on eBPF";
homepage = "https://github.com/coroot/coroot-node-agent";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ errnoh ];
mainProgram = "coroot-node-agent";
};
})