nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libgcrypt, libbaseencode }:
2
3stdenv.mkDerivation rec {
4 pname = "libcotp";
5 version = "1.2.4";
6
7 src = fetchFromGitHub {
8 owner = "paolostivanin";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-PN0kd0CP2zrkuPTdaS3TdsdEl+Gy6CecrDSh0Bd7mRk=";
12 };
13
14 buildInputs = [ libbaseencode libgcrypt ];
15 nativeBuildInputs = [ cmake pkg-config ];
16
17 meta = with lib; {
18 description = "C library that generates TOTP and HOTP";
19 homepage = "https://github.com/paolostivanin/libcotp";
20 license = licenses.asl20;
21 maintainers = with maintainers; [ alexbakker ];
22 };
23}