prometheus-node-exporter: Use finalAttrs
This commit is contained in:
@@ -6,15 +6,14 @@
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "node_exporter";
|
||||
version = "1.10.2";
|
||||
rev = "v${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "prometheus";
|
||||
repo = "node_exporter";
|
||||
tag = "${finalAttrs.version}";
|
||||
hash = "sha256-UaybbRmcvifXNwTNXg7mIYN9JnonSxwG62KfvU5auIE=";
|
||||
};
|
||||
|
||||
@@ -28,8 +27,8 @@ buildGoModule rec {
|
||||
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.Version=${finalAttrs.version}"
|
||||
"-X github.com/prometheus/common/version.Revision=unknown"
|
||||
"-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"
|
||||
@@ -46,7 +45,7 @@ buildGoModule rec {
|
||||
description = "Prometheus exporter for machine metrics";
|
||||
mainProgram = "node_exporter";
|
||||
homepage = "https://github.com/prometheus/node_exporter";
|
||||
changelog = "https://github.com/prometheus/node_exporter/blob/v${version}/CHANGELOG.md";
|
||||
changelog = "https://github.com/prometheus/node_exporter/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
benley
|
||||
@@ -55,4 +54,4 @@ buildGoModule rec {
|
||||
Frostman
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user