nixpkgs/pkgs/applications/misc/cotp/default.nix
2024-06-20 05:01:48 +00:00

33 lines
790 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, AppKit
, libxcb
}:
rustPlatform.buildRustPackage rec {
pname = "cotp";
version = "1.7.1";
src = fetchFromGitHub {
owner = "replydev";
repo = "cotp";
rev = "v${version}";
hash = "sha256-6FriNAwxo+YnJWmCrScyafUEkJvEJz3O9Zoj9yerpSI=";
};
cargoHash = "sha256-/CW0CGhPjKd5oU2LYW4lPWKMATn9aJdjIy44yZJyU/E=";
buildInputs = lib.optionals stdenv.isLinux [ libxcb ]
++ lib.optionals stdenv.isDarwin [ AppKit ];
meta = with lib; {
homepage = "https://github.com/replydev/cotp";
description = "Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality";
license = licenses.gpl3Only;
maintainers = with maintainers; [ davsanchez ];
mainProgram = "cotp";
};
}