From 34a497196e1bf16f97b72ef736ce6565787cc0e7 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Thu, 13 Oct 2022 22:00:36 +0800 Subject: [PATCH] go-2fa: use buildGoModule (#193459) --- pkgs/tools/security/2fa/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/security/2fa/default.nix b/pkgs/tools/security/2fa/default.nix index b06454e736c8..6de513ec92b4 100644 --- a/pkgs/tools/security/2fa/default.nix +++ b/pkgs/tools/security/2fa/default.nix @@ -1,10 +1,8 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { - version = "1.2.0"; +buildGoModule rec { pname = "2fa"; - - goPackagePath = "rsc.io/2fa"; + version = "1.2.0"; src = fetchFromGitHub { owner = "rsc"; @@ -13,10 +11,15 @@ buildGoPackage rec { sha256 = "sha256-cB5iADZwvJQwwK1GockE2uicFlqFMEAY6xyeXF5lnUY="; }; + deleteVendor = true; + vendorSha256 = "sha256-4h/+ZNxlJPYY0Kyu2vDE1pDXxC/kGE5JdnagWVOGzAE="; + + ldflags = [ "-s" "-w" ]; + meta = with lib; { homepage = "https://rsc.io/2fa"; description = "Two-factor authentication on the command line"; - maintainers = with maintainers; [ rvolosatovs ]; license = licenses.bsd3; + maintainers = with maintainers; [ rvolosatovs ]; }; }