2022-02-16 17:29:28 +00:00
|
|
|
{ lib, stdenv, fetchurl, nix-update-script, pam, xmlsec }:
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2015-09-23 04:25:53 +00:00
|
|
|
let
|
2021-07-16 01:06:00 +00:00
|
|
|
# TODO: Switch to OpenPAM once https://gitlab.com/oath-toolkit/oath-toolkit/-/issues/26 is addressed upstream
|
2015-09-23 04:25:53 +00:00
|
|
|
securityDependency =
|
|
|
|
if stdenv.isDarwin then xmlsec
|
|
|
|
else pam;
|
2018-02-25 08:05:42 +00:00
|
|
|
|
2021-04-27 18:49:18 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "oath-toolkit";
|
2021-05-02 10:38:18 +00:00
|
|
|
version = "2.6.7";
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2021-04-27 18:49:18 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
|
2021-05-02 10:38:18 +00:00
|
|
|
sha256 = "1aa620k05lsw3l3slkp2mzma40q3p9wginspn9zk8digiz7dzv9n";
|
2013-03-30 23:07:35 +00:00
|
|
|
};
|
|
|
|
|
2021-04-27 18:49:18 +00:00
|
|
|
buildInputs = [ securityDependency ];
|
2013-03-30 23:07:35 +00:00
|
|
|
|
2021-07-16 01:06:00 +00:00
|
|
|
configureFlags = lib.optionals stdenv.isDarwin [ "--disable-pam" ];
|
|
|
|
|
2022-12-25 22:11:14 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-05-02 10:38:18 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with 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/";
|
2021-04-27 18:49:18 +00:00
|
|
|
maintainers = with maintainers; [ schnusch ];
|
2018-02-25 08:05:42 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2013-03-30 23:07:35 +00:00
|
|
|
};
|
|
|
|
}
|