2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, libfido2, pam, openssl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pam_u2f";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/pam-u2f/Releases/${pname}-${version}.tar.gz";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-cOdBvKGXtktPvo3R9tV84ritWMp4Y1LFJfPy1EEliUw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-10-16 20:44:37 +00:00
|
|
|
buildInputs = [ libfido2 pam openssl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=("--with-pam-dir=$out/lib/security")
|
|
|
|
'';
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
# a no-op makefile to prevent building the fuzz targets
|
|
|
|
postConfigure = ''
|
|
|
|
cat > fuzz/Makefile <<EOF
|
|
|
|
all:
|
|
|
|
install:
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://developers.yubico.com/pam-u2f/";
|
|
|
|
description = "A PAM module for allowing authentication with a U2F device";
|
2022-08-21 13:32:41 +00:00
|
|
|
changelog = "https://github.com/Yubico/pam-u2f/raw/pam_u2f-${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ philandstuff ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "pamu2fcfg";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|