diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-12-23 16:36:02 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-12-23 16:38:29 +0100 |
commit | b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2 (patch) | |
tree | 5502078dcf8477a5da2b516ba0df8c01de356135 /pkgs/servers | |
parent | 5a26fb3c98795141334a973648f6ce9f24677894 (diff) | |
download | nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar.gz nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar.bz2 nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar.lz nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar.xz nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.tar.zst nixlib-b33b086506ee4c5abf5f3b9ce9f9b86d6ba388c2.zip |
prometheus: gross hack to fix linker flags for versioning info
Apparently the handling of `buildFlagsArray` in `buildGo*` is blatantly broken since it doesn't quote flags specified as list elements properly. Because of that, the `-ldflags` are not interpreted properly and `prometheus --version` doesn't output anything useful. By specifying flags in both `buildFlags` and `buildFlagsArray` the issue gets fixed since both variables are passed to `go install`.
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/monitoring/prometheus/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index b0de5b271d44..2852fb2afc29 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -44,10 +44,10 @@ in buildGoPackage rec { ln -s ${webui} web/ui/static/react ''; + buildFlags = "-tags=builtinassets"; buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in [ - "-tags=builtinassets" '' -ldflags= -X ${t}.Version=${version} |