Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
autoAddDriverRunpath,
|
|
dcgm,
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "dcgm-exporter";
|
|
|
|
# The first portion of this version string corresponds to a compatible DCGM
|
|
# version.
|
|
version = "4.3.1-4.4.0"; # N.B: If you change this, update dcgm as well to the matching version.
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NVIDIA";
|
|
repo = "dcgm-exporter";
|
|
tag = version;
|
|
hash = "sha256-NafQWP1NxHTwmOND8ovy3oVia7qq0rCwZYE3VNlMBKQ=";
|
|
};
|
|
|
|
CGO_LDFLAGS = "-ldcgm";
|
|
|
|
buildInputs = [
|
|
dcgm
|
|
];
|
|
|
|
# gonvml and go-dcgm do not work with ELF BIND_NOW hardening because not all
|
|
# symbols are available on startup.
|
|
hardeningDisable = [ "bindnow" ];
|
|
|
|
vendorHash = "sha256-BfHC49Dzb4ArXK87JKD+aYEHR5HUS5NL0fEHa0jOCYM=";
|
|
|
|
nativeBuildInputs = [
|
|
autoAddDriverRunpath
|
|
];
|
|
|
|
# Tests try to interact with running DCGM service.
|
|
doCheck = false;
|
|
|
|
postFixup = ''
|
|
patchelf --add-needed libnvidia-ml.so "$out/bin/dcgm-exporter"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "NVIDIA GPU metrics exporter for Prometheus leveraging DCGM";
|
|
homepage = "https://github.com/NVIDIA/dcgm-exporter";
|
|
license = licenses.asl20;
|
|
teams = [ teams.deshaw ];
|
|
mainProgram = "dcgm-exporter";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|