nixpkgs/pkgs/applications/misc/cotp/default.nix
2024-05-09 21:51:00 +00:00

33 lines
790 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, AppKit
, libxcb
}:
rustPlatform.buildRustPackage rec {
pname = "cotp";
version = "1.6.1";
src = fetchFromGitHub {
owner = "replydev";
repo = "cotp";
rev = "v${version}";
hash = "sha256-QWx42uSjN6Dev5JTa8vPTXOxr8qw5kerLepTWhJTb1I=";
};
cargoHash = "sha256-5PUVg08D8cZdUIt1A9wjpi9bc/XsB9P7S6L8M054MCg=";
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";
};
}