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
@ -44,10 +44,10 @@ in buildGoPackage rec {
|
|||||||
ln -s ${webui} web/ui/static/react
|
ln -s ${webui} web/ui/static/react
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
buildFlags = "-tags=builtinassets";
|
||||||
buildFlagsArray = let
|
buildFlagsArray = let
|
||||||
t = "${goPackagePath}/vendor/github.com/prometheus/common/version";
|
t = "${goPackagePath}/vendor/github.com/prometheus/common/version";
|
||||||
in [
|
in [
|
||||||
"-tags=builtinassets"
|
|
||||||
''
|
''
|
||||||
-ldflags=
|
-ldflags=
|
||||||
-X ${t}.Version=${version}
|
-X ${t}.Version=${version}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user