buildGoModule: handle ldflags and tags __structuredAttrs-agnostically

This commit is contained in:
Yueh-Shun Li
2024-11-29 11:55:36 +08:00
parent 5c74641e44
commit b9efad374e
+2 -2
View File
@@ -222,8 +222,8 @@ in
local cmd="$1" dir="$2"
declare -a flags
flags+=(''${tags:+-tags=''${tags// /,}})
flags+=(''${ldflags:+-ldflags="$ldflags"})
flags+=(''${tags:+-tags=$(concatStringsSep "," tags)})
flags+=(''${ldflags:+-ldflags="''${ldflags[*]}"})
flags+=("-p" "$NIX_BUILD_CORES")
if (( "''${NIX_DEBUG:-0}" >= 1 )); then
flags+=(-x)