2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, libfido2, pam, openssl }:
|
2015-09-23 08:25:55 +02:00
|
|
|
|
2015-05-03 16:29:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pam_u2f";
|
2021-12-08 15:14:57 +01:00
|
|
|
version = "1.2.0";
|
2015-09-23 08:25:55 +02:00
|
|
|
|
2015-05-03 16:29:42 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://developers.yubico.com/pam-u2f/Releases/${pname}-${version}.tar.gz";
|
2021-12-08 15:14:57 +01:00
|
|
|
sha256 = "sha256-IwPm+Zsf3o7jw6sopN4tpt3SJclTaT6EXWstg4giH7M=";
|
2015-05-03 16:29:42 +02:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-10-11 21:15:54 +02:00
|
|
|
buildInputs = [ libfido2 pam openssl ];
|
2015-09-23 08:25:55 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=("--with-pam-dir=$out/lib/security")
|
|
|
|
'';
|
2015-05-03 16:29:42 +02:00
|
|
|
|
2021-06-03 22:55:35 +02:00
|
|
|
# a no-op makefile to prevent building the fuzz targets
|
|
|
|
postConfigure = ''
|
|
|
|
cat > fuzz/Makefile <<EOF
|
|
|
|
all:
|
|
|
|
install:
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://developers.yubico.com/pam-u2f/";
|
2015-05-03 16:29:42 +02:00
|
|
|
description = "A PAM module for allowing authentication with a U2F device";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ philandstuff ];
|
|
|
|
};
|
|
|
|
}
|