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`.
This commit is contained in:
parent
5a26fb3c98
commit
b33b086506
1 changed files with 1 additions and 1 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue