From 7f76ac5d6a561049da12617736ba958a79d5a4be Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Fri, 18 Feb 2022 16:30:04 +0100 Subject: [PATCH] tty-share: switch to buildGoModule Also pass the version to the go linker. --- pkgs/applications/misc/tty-share/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/tty-share/default.nix b/pkgs/applications/misc/tty-share/default.nix index 7e76d4a4e0b..a1adc152349 100644 --- a/pkgs/applications/misc/tty-share/default.nix +++ b/pkgs/applications/misc/tty-share/default.nix @@ -1,7 +1,6 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: -# Upstream has a `./vendor` directory with all deps which we rely upon. -buildGoPackage rec { +buildGoModule rec { pname = "tty-share"; version = "2.2.1"; @@ -12,7 +11,10 @@ buildGoPackage rec { sha256 = "sha256-aAqKfi0ZX0UB07yGY6x0HcMspvq4rcJXKHSONxAwMlc="; }; - goPackagePath = "github.com/elisescu/tty-share"; + # Upstream has a `./vendor` directory with all deps which we rely upon. + vendorSha256 = null; + + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { homepage = "https://tty-share.com";