2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, fetchpatch, pam, xmlsec, autoreconfHook, pkg-config, libxml2, gtk-doc, perl, gengetopt, bison, help2man }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
securityDependency =
|
|
|
|
if stdenv.isDarwin then xmlsec
|
|
|
|
else pam;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "oath-toolkit-2.6.2";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "oath-toolkit";
|
|
|
|
repo = "oath-toolkit";
|
|
|
|
rev = "0dffdec9c5af5c89a5af43add29d8275eefe7414";
|
|
|
|
sha256 = "0n2sl444723f1k0sjmc0mzdwslx51yxac39c2cx2bl3ykacgfv74";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# fix for glibc>=2.28
|
|
|
|
(fetchpatch {
|
|
|
|
name = "new_glibc_check.patch";
|
|
|
|
url = "https://sources.debian.org/data/main/o/oath-toolkit/2.6.1-1.3/debian/patches/new-glibc-check.patch";
|
|
|
|
sha256 = "0h75xyy3xsl485v7w27yqkks6z9sgsjmrv6wiswy15fdj5wyciv3";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ securityDependency libxml2 perl gengetopt bison ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook gtk-doc help2man pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# man file generation fails when true
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
configureFlags = [ "--disable-pskc" ];
|
|
|
|
|
|
|
|
# Replicate the steps from cfg.mk
|
|
|
|
preAutoreconf = ''
|
|
|
|
printf "gdoc_MANS =\ngdoc_TEXINFOS =\n" > liboath/man/Makefile.gdoc
|
|
|
|
printf "gdoc_MANS =\ngdoc_TEXINFOS =\n" > libpskc/man/Makefile.gdoc
|
|
|
|
touch ChangeLog
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Components for building one-time password authentication systems";
|
|
|
|
homepage = "https://www.nongnu.org/oath-toolkit/";
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|