1{ stdenv, fetchurl, pkgconfig, json_c, hidapi }:
2
3stdenv.mkDerivation rec {
4 name = "libu2f-host-1.1.4";
5
6 src = fetchurl {
7 url = "https://developers.yubico.com/libu2f-host/Releases/${name}.tar.xz";
8 sha256 = "0vvs2p3b25cbybccv3f4ridnp7sg5i4hkzx3hx48ldcn1l1fqhv0";
9 };
10
11 nativeBuildInputs = [ pkgconfig ];
12 buildInputs = [ json_c hidapi ];
13
14 doCheck = true;
15
16 postInstall = ''
17 install -D -t $out/lib/udev/rules.d 70-u2f.rules
18 '';
19
20 meta = with stdenv.lib; {
21 homepage = https://developers.yubico.com/libu2f-host;
22 description = "A C library and command-line tool that implements the host-side of the U2F protocol";
23 license = licenses.bsd2;
24 platforms = platforms.unix;
25 maintainers = with maintainers; [ wkennington ];
26 };
27}