go-2fa: use buildGoModule (#193459)

authored by Aaron Jheng and committed by GitHub 34a49719 cb0c860e

+9 -6
+9 -6
pkgs/tools/security/2fa/default.nix
··· 1 - { lib, buildGoPackage, fetchFromGitHub }: 1 + { lib, buildGoModule, fetchFromGitHub }: 2 2 3 - buildGoPackage rec { 4 - version = "1.2.0"; 3 + buildGoModule rec { 5 4 pname = "2fa"; 6 - 7 - goPackagePath = "rsc.io/2fa"; 5 + version = "1.2.0"; 8 6 9 7 src = fetchFromGitHub { 10 8 owner = "rsc"; ··· 13 11 sha256 = "sha256-cB5iADZwvJQwwK1GockE2uicFlqFMEAY6xyeXF5lnUY="; 14 12 }; 15 13 14 + deleteVendor = true; 15 + vendorSha256 = "sha256-4h/+ZNxlJPYY0Kyu2vDE1pDXxC/kGE5JdnagWVOGzAE="; 16 + 17 + ldflags = [ "-s" "-w" ]; 18 + 16 19 meta = with lib; { 17 20 homepage = "https://rsc.io/2fa"; 18 21 description = "Two-factor authentication on the command line"; 19 - maintainers = with maintainers; [ rvolosatovs ]; 20 22 license = licenses.bsd3; 23 + maintainers = with maintainers; [ rvolosatovs ]; 21 24 }; 22 25 }