2015-09-23 08:25:55 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libu2f-host, libu2f-server, pam }:
|
|
|
|
|
2015-05-03 16:29:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pam_u2f-${version}";
|
2018-05-17 23:56:24 +02:00
|
|
|
version = "1.0.7";
|
2015-09-23 08:25:55 +02:00
|
|
|
|
2015-05-03 16:29:42 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/pam-u2f/Releases/${name}.tar.gz";
|
2018-05-17 23:56:24 +02:00
|
|
|
sha256 = "1kz7d3vr5dag1d5zq14kcp887p5d0q079dy1sqyl8ndi567asjh3";
|
2015-05-03 16:29:42 +02:00
|
|
|
};
|
|
|
|
|
2015-09-23 08:25:55 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libu2f-host libu2f-server pam ];
|
|
|
|
|
|
|
|
# Fix the broken include in 1.0.1
|
|
|
|
CFLAGS = "-I${libu2f-host}/include/u2f-host";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=("--with-pam-dir=$out/lib/security")
|
|
|
|
'';
|
2015-05-03 16:29:42 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://developers.yubico.com/pam-u2f/;
|
|
|
|
description = "A PAM module for allowing authentication with a U2F device";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ philandstuff ];
|
|
|
|
};
|
|
|
|
}
|