depot/third_party/nixpkgs/pkgs/development/libraries/libcotp/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

29 lines
808 B
Nix

{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libgcrypt }:
stdenv.mkDerivation rec {
pname = "libcotp";
version = "3.0.0";
src = fetchFromGitHub {
owner = "paolostivanin";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/IIzUMms4aS63psyxwL+Ynj78c38R3WwbD2HIpdHF88=";
};
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;
};
}