2020-01-14 22:43:23 +00:00
|
|
|
{ stdenv, fetchFromGitLab, fetchpatch, pam, xmlsec, autoreconfHook, pkgconfig, libxml2, gtk-doc, perl, gengetopt, bison, help2man }:
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2015-09-23 04:25:53 +00:00
|
|
|
let
|
|
|
|
securityDependency =
|
|
|
|
if stdenv.isDarwin then xmlsec
|
|
|
|
else pam;
|
2018-02-25 08:05:42 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
in stdenv.mkDerivation {
|
2017-09-24 19:04:33 +00:00
|
|
|
name = "oath-toolkit-2.6.2";
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2018-02-25 08:05:42 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "oath-toolkit";
|
|
|
|
repo = "oath-toolkit";
|
2018-02-22 12:08:20 +00:00
|
|
|
rev = "0dffdec9c5af5c89a5af43add29d8275eefe7414";
|
2018-02-25 08:05:42 +00:00
|
|
|
sha256 = "0n2sl444723f1k0sjmc0mzdwslx51yxac39c2cx2bl3ykacgfv74";
|
2013-03-30 23:07:35 +00:00
|
|
|
};
|
|
|
|
|
2020-01-14 22:43:23 +00:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-02-25 08:05:42 +00:00
|
|
|
buildInputs = [ securityDependency libxml2 perl gengetopt bison ];
|
|
|
|
|
2019-03-09 11:06:23 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook gtk-doc help2man pkgconfig ];
|
2018-02-25 08:05:42 +00:00
|
|
|
|
|
|
|
# man file generation fails when true
|
|
|
|
enableParallelBuilding = false;
|
2017-09-24 19:04:33 +00:00
|
|
|
|
2018-02-22 12:08:20 +00:00
|
|
|
configureFlags = [ "--disable-pskc" ];
|
|
|
|
|
2018-02-25 08:05:42 +00:00
|
|
|
# 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
|
2018-02-22 12:08:20 +00:00
|
|
|
'';
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2018-02-25 08:05:42 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-03-30 23:07:35 +00:00
|
|
|
description = "Components for building one-time password authentication systems";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.nongnu.org/oath-toolkit/";
|
2018-02-25 08:05:42 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2013-03-30 23:07:35 +00:00
|
|
|
};
|
|
|
|
}
|