2022-11-02 22:02:43 +00:00
|
|
|
{ lib, stdenv, fetchurl, nix-update-script, pam, xmlsec }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-07-16 19:40:57 +00:00
|
|
|
# TODO: Switch to OpenPAM once https://gitlab.com/oath-toolkit/oath-toolkit/-/issues/26 is addressed upstream
|
2020-04-24 23:36:52 +00:00
|
|
|
securityDependency =
|
|
|
|
if stdenv.isDarwin then xmlsec
|
|
|
|
else pam;
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "oath-toolkit";
|
2021-06-06 07:54:09 +00:00
|
|
|
version = "2.6.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
|
2021-06-06 07:54:09 +00:00
|
|
|
sha256 = "1aa620k05lsw3l3slkp2mzma40q3p9wginspn9zk8digiz7dzv9n";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
buildInputs = [ securityDependency ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
configureFlags = lib.optionals stdenv.isDarwin [ "--disable-pam" ];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-06-06 07:54:09 +00:00
|
|
|
|
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/";
|
2021-05-03 20:48:10 +00:00
|
|
|
maintainers = with maintainers; [ schnusch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|