3
0
Fork 0
forked from mirrors/nixpkgs

prometheus-node-exporter: fix version info (#126580)

Closes #126359
This commit is contained in:
Maximilian Bosch 2021-06-13 02:33:06 +02:00 committed by GitHub
parent 8e70649e48
commit 722e5ccfea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,12 @@ buildGoModule rec {
goPackagePath = "github.com/prometheus/node_exporter";
in ''
-ldflags=
-X ${goPackagePath}/vendor/github.com/prometheus/common/version.Version=${version}
-X ${goPackagePath}/vendor/github.com/prometheus/common/version.Revision=${rev}
-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; };