diff options
author | Paul Meyer <49727155+katexochen@users.noreply.github.com> | 2024-01-07 11:10:58 +0100 |
---|---|---|
committer | Paul Meyer <49727155+katexochen@users.noreply.github.com> | 2024-04-15 07:39:04 +0200 |
commit | b2f0e7301eaa8fdeb2b1975f01304dabd1a540d1 (patch) | |
tree | af4a5381e981ca8fa34c3cfe2ab2ca26bd763bac /pkgs/servers/trickster | |
parent | dd540970e215516c6682bd5f7c7eb9f4bb666c62 (diff) |
treewide: remove buildFlags use in buildGoModule
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Diffstat (limited to 'pkgs/servers/trickster')
-rw-r--r-- | pkgs/servers/trickster/trickster.nix | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/pkgs/servers/trickster/trickster.nix b/pkgs/servers/trickster/trickster.nix index 7b527a5c20b2d..2215990654539 100644 --- a/pkgs/servers/trickster/trickster.nix +++ b/pkgs/servers/trickster/trickster.nix @@ -1,6 +1,7 @@ { lib , buildGoModule , fetchFromGitHub +, go }: buildGoModule rec { @@ -19,22 +20,14 @@ buildGoModule rec { subPackages = [ "cmd/trickster" ]; - preBuild = - let - ldflags = with lib; - concatStringsSep " " ( - [ "-extldflags '-static'" "-s" "-w" ] ++ - (mapAttrsToList (n: v: "-X main.application${n}=${v}") { - BuildTime = "1970-01-01T00:00:00+0000"; - GitCommitID = rev; - GoVersion = "$(go env GOVERSION)"; - GoArch = "$(go env GOARCH)"; - }) - ); - in - '' - buildFlagsArray+=("-ldflags=${ldflags}") - ''; + ldflags = with lib; + [ "-extldflags '-static'" "-s" "-w" ] ++ + (mapAttrsToList (n: v: "-X main.application${n}=${v}") { + BuildTime = "1970-01-01T00:00:00+0000"; + GitCommitID = rev; + GoVersion = "go${go.version}}"; + GoArch = "${go.GOARCH}"; + }); # Tests are broken. doCheck = false; |