about summary refs log tree commit diff
path: root/pkgs/tools/security/2fa
diff options
context:
space:
mode:
authorAaron Jheng <wentworth@outlook.com>2022-10-13 22:00:36 +0800
committerGitHub <noreply@github.com>2022-10-13 16:00:36 +0200
commit34a497196e1bf16f97b72ef736ce6565787cc0e7 (patch)
tree0bab890a696664f5667e65ca5e919d9bca4b089b /pkgs/tools/security/2fa
parentcb0c860e24a833381e0ece292b32728443b53ff3 (diff)
go-2fa: use buildGoModule (#193459)
Diffstat (limited to 'pkgs/tools/security/2fa')
-rw-r--r--pkgs/tools/security/2fa/default.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/tools/security/2fa/default.nix b/pkgs/tools/security/2fa/default.nix
index b06454e736c89..6de513ec92b43 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 ];
   };
 }