diff --git a/pkgs/applications/misc/cotp/default.nix b/pkgs/applications/misc/cotp/default.nix new file mode 100644 index 000000000000..408838a0a284 --- /dev/null +++ b/pkgs/applications/misc/cotp/default.nix @@ -0,0 +1,31 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, AppKit +, libxcb +}: + +rustPlatform.buildRustPackage rec { + name = "cotp"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "replydev"; + repo = "cotp"; + rev = "v${version}"; + hash = "sha256-SbS+ch7/45kZb49jW2mnRWQruLrfrNfeZFqEPHQKGUg="; + }; + + cargoHash = "sha256-2lIR3K4/hr4XSmNGFd/dhwoFOtEB9KSnUrZkcaCyc9k="; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c90cc0cd039f..2ca8051e9377 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -388,6 +388,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + cotp = callPackage ../applications/misc/cotp { + inherit (darwin.apple_sdk.frameworks) AppKit; + }; + cmark = callPackage ../development/libraries/cmark { }; cmark-gfm = callPackage ../development/libraries/cmark-gfm { };