go-2fa: use buildGoModule (#193459)

This commit is contained in:
Aaron Jheng 2022-10-13 22:00:36 +08:00 committed by GitHub
parent cb0c860e24
commit 34a497196e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ];
};
}