prometheus-mysqld-exporter: cleanup rev variable (#225364)

This commit is contained in:
Sandro 2023-04-10 18:30:11 +02:00 committed by GitHub
parent 884d234dd1
commit 4db61062ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,12 +3,11 @@
buildGoModule rec { buildGoModule rec {
pname = "mysqld_exporter"; pname = "mysqld_exporter";
version = "0.14.0"; version = "0.14.0";
rev = "v${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit rev;
owner = "prometheus"; owner = "prometheus";
repo = "mysqld_exporter"; repo = "mysqld_exporter";
rev = "v${version}";
sha256 = "sha256-SMcpQNygv/jVLNuQP8V6BH/CmSt5Y4dzYPsboTH2dos="; sha256 = "sha256-SMcpQNygv/jVLNuQP8V6BH/CmSt5Y4dzYPsboTH2dos=";
}; };
@ -17,7 +16,7 @@ buildGoModule rec {
ldflags = let t = "github.com/prometheus/common/version"; in [ ldflags = let t = "github.com/prometheus/common/version"; in [
"-s" "-w" "-s" "-w"
"-X ${t}.Version=${version}" "-X ${t}.Version=${version}"
"-X ${t}.Revision=${rev}" "-X ${t}.Revision=${src.rev}"
"-X ${t}.Branch=unknown" "-X ${t}.Branch=unknown"
"-X ${t}.BuildUser=nix@nixpkgs" "-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown" "-X ${t}.BuildDate=unknown"