Unverified Commit 1ffcb1fe authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

totp-cli: init at 1.8.7 (#348086)

parents b4b6cc61 103d2c9f
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
{
  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";
  };
}