Skip to content

Commit

Permalink
prometheus-node-exporter: use 1.6.1 pinned
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Apr 23, 2024
1 parent d4d48ba commit 3699264
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions pkgs/prometheus-node-exporter/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests
}:

buildGoModule rec {
pname = "node_exporter";
version = "1.6.1";
rev = "v${version}";

src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "node_exporter";
sha256 = "sha256-BCZLMSJP/63N+pZsK8er87Zem7IFGdkyruDs6UVDZSM=";
};

vendorHash = "sha256-hn2cMKhLl5qsm4sZErs6PXTs8yajowxw9a9vtHe5cAk=";

# FIXME: tests fail due to read-only nix store
doCheck = false;

excludedPackages = [ "docs/node-mixin" ];

ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${version}"
"-X github.com/prometheus/common/version.Revision=${rev}"
"-X github.com/prometheus/common/version.Branch=unknown"
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
"-X github.com/prometheus/common/version.BuildDate=unknown"
];

passthru.tests = { inherit (nixosTests.prometheus-exporters) node; };

meta = with lib; {
description = "Prometheus exporter for machine metrics";
homepage = "https://github.com/prometheus/node_exporter";
changelog = "https://github.com/prometheus/node_exporter/blob/v${version}/CHANGELOG.md";
mainProgram = "node_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ benley fpletz globin Frostman ];
};
}

0 comments on commit 3699264

Please sign in to comment.