buildGo{Module,Package}: remove input argument "tags"

Unify how ldflags and tags are passed
This commit is contained in:
Yueh-Shun Li 2023-05-26 00:21:04 +08:00 committed by zowoq
parent a91f6eba1e
commit aea73adfdd
2 changed files with 2 additions and 8 deletions

View File

@ -6,9 +6,6 @@
, passthru ? { }
, patches ? [ ]
# Go tags, passed to go via -tag
, tags ? [ ]
# A function to override the go-modules derivation
, overrideModAttrs ? (_oldAttrs: { })
@ -201,7 +198,7 @@ let
declare -a flags
flags+=($buildFlags "''${buildFlagsArray[@]}")
flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}})
flags+=(''${tags:+-tags=''${tags// /,}})
flags+=(''${ldflags:+-ldflags="$ldflags"})
flags+=("-p" "$NIX_BUILD_CORES")

View File

@ -7,9 +7,6 @@
, preFixup ? ""
, shellHook ? ""
# Go tags, passed to go via -tag
, tags ? []
# We want parallel builds by default
, enableParallelBuilding ? true
@ -166,7 +163,7 @@ let
declare -a flags
flags+=($buildFlags "''${buildFlagsArray[@]}")
flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}})
flags+=(''${tags:+-tags=''${tags// /,}})
flags+=(''${ldflags:+-ldflags="$ldflags"})
flags+=("-p" "$NIX_BUILD_CORES")