mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
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
|
||||
'';
|
||||
|
||||
buildFlags = "-tags=builtinassets";
|
||||
buildFlagsArray = let
|
||||
t = "${goPackagePath}/vendor/github.com/prometheus/common/version";
|
||||
in [
|
||||
"-tags=builtinassets"
|
||||
''
|
||||
-ldflags=
|
||||
-X ${t}.Version=${version}
|
||||
|
Loading…
Reference in New Issue
Block a user