depot/third_party/nixpkgs/pkgs/os-specific/linux/pam_u2f/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

29 lines
871 B
Nix

{ stdenv, fetchurl, pkgconfig, libu2f-host, libu2f-server, pam }:
stdenv.mkDerivation rec {
pname = "pam_u2f";
version = "1.0.8";
src = fetchurl {
url = "https://developers.yubico.com/pam-u2f/Releases/${pname}-${version}.tar.gz";
sha256 = "16awjzx348imjz141fzzldy00qpdmw2g37rnq430w5mnzak078jj";
};
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")
'';
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 ];
};
}