1 { stdenv, lib, fetchFromGitHub, cmake, pkg-config, libgcrypt }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "paolostivanin";
11 sha256 = "sha256-Ol/vWaXcbDcy+d8V//fK4SYUpnYmwuYJxkO3/+kqgdM=";
14 postPatch = lib.optionalString stdenv.cc.isClang ''
15 substituteInPlace CMakeLists.txt \
16 --replace "add_link_options(-Wl," "# add_link_options(-Wl,"
19 buildInputs = [ libgcrypt ];
20 nativeBuildInputs = [ cmake pkg-config ];
23 description = "C library that generates TOTP and HOTP";
24 homepage = "https://github.com/paolostivanin/libcotp";
25 license = licenses.asl20;
26 maintainers = with maintainers; [ alexbakker ];
27 platforms = platforms.all;