depot/third_party/nixpkgs/pkgs/development/libraries/libcotp/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

29 lines
808 B
Nix

{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libgcrypt }:
stdenv.mkDerivation rec {
pname = "libcotp";
version = "3.1.0";
src = fetchFromGitHub {
owner = "paolostivanin";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Ol/vWaXcbDcy+d8V//fK4SYUpnYmwuYJxkO3/+kqgdM=";
};
postPatch = lib.optionalString stdenv.cc.isClang ''
substituteInPlace CMakeLists.txt \
--replace "add_link_options(-Wl," "# add_link_options(-Wl,"
'';
buildInputs = [ libgcrypt ];
nativeBuildInputs = [ cmake pkg-config ];
meta = with lib; {
description = "C library that generates TOTP and HOTP";
homepage = "https://github.com/paolostivanin/libcotp";
license = licenses.asl20;
maintainers = with maintainers; [ alexbakker ];
platforms = platforms.all;
};
}