From 103d2c9fd923693baa00e78c6f53b6d683d73822 Mon Sep 17 00:00:00 2001 From: luftmensch-luftmensch Date: Sat, 12 Oct 2024 15:02:50 +0200 Subject: [PATCH] totp-cli: init at 1.8.7 --- pkgs/by-name/to/totp-cli/package.nix | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/by-name/to/totp-cli/package.nix diff --git a/pkgs/by-name/to/totp-cli/package.nix b/pkgs/by-name/to/totp-cli/package.nix new file mode 100644 index 000000000000..39db0a9682cc --- /dev/null +++ b/pkgs/by-name/to/totp-cli/package.nix @@ -0,0 +1,38 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, +}: +let + pname = "totp-cli"; + version = "1.8.7"; +in +buildGoModule { + inherit pname version; + + src = fetchFromGitHub { + owner = "yitsushi"; + repo = "totp-cli"; + rev = "refs/tags/v${version}"; + hash = "sha256-WCPDrKGIRrYJFeozXtf8YPgHJ8m6DAsMBD8Xgjvclvc="; + }; + + vendorHash = "sha256-VTlSnw3TyVOQPU+nMDhRtyUrBID2zesGeG2CgDyjwWY="; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --bash autocomplete/bash_autocomplete + installShellCompletion --zsh autocomplete/zsh_autocomplete + ''; + + meta = { + description = "Authy/Google Authenticator like TOTP CLI tool written in Go"; + changelog = "https://github.com/yitsushi/totp-cli/releases/"; + homepage = "https://yitsushi.github.io/totp-cli/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ luftmensch-luftmensch ]; + mainProgram = "totp-cli"; + }; +}