diff options
author | Vladimír Čunát <v@cunat.cz> | 2024-05-05 17:31:58 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2024-05-05 17:31:58 +0200 |
commit | 93947b281226d5d89a39073b10caaf6c906070aa (patch) | |
tree | d55f8944fd90a3dd0d86e0f495f3d0bbdf795060 /pkgs/servers/trickster | |
parent | 5dc079ed333c755fe000f2b86e97bf11f6f069a4 (diff) | |
parent | 100509c030faf7cca1582c5a7197b8d3a815d600 (diff) |
Merge branch 'staging' into staging-next
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; |