diff options
author | Yueh-Shun Li <shamrocklee@posteo.net> | 2023-05-26 00:21:04 +0800 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2023-05-31 07:14:18 +1000 |
commit | aea73adfddadfd4df2d6851991a45a9fb603c9d7 (patch) | |
tree | 4bd716384f85a1d43c1d33d0d8df88714647c443 /pkgs/build-support | |
parent | a91f6eba1e40545e9b323988fda4cd27561c6009 (diff) |
buildGo{Module,Package}: remove input argument "tags"
Unify how ldflags and tags are passed
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/go/module.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/go/package.nix | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix index 2432ac3a49823..61abd040a46fb 100644 --- a/pkgs/build-support/go/module.nix +++ b/pkgs/build-support/go/module.nix @@ -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") diff --git a/pkgs/build-support/go/package.nix b/pkgs/build-support/go/package.nix index f9e6c14ab2716..b4cb264d9f242 100644 --- a/pkgs/build-support/go/package.nix +++ b/pkgs/build-support/go/package.nix @@ -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") |