about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libu2f-host
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libu2f-host')
-rw-r--r--nixpkgs/pkgs/development/libraries/libu2f-host/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix b/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix
new file mode 100644
index 000000000000..675ca1cd220b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, json_c, hidapi }:
+
+stdenv.mkDerivation rec {
+  name = "libu2f-host-1.1.6";
+
+  src = fetchurl {
+    url = "https://developers.yubico.com/libu2f-host/Releases/${name}.tar.xz";
+    sha256 = "19xxwwqfzg3njfpxvhlyxd05wjwsdw3m4lpn7gk31cna6agbp82d";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ json_c hidapi ];
+
+  doCheck = true;
+
+  postInstall = ''
+    install -D -t $out/lib/udev/rules.d 70-u2f.rules
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://developers.yubico.com/libu2f-host;
+    description = "A C library and command-line tool that implements the host-side of the U2F protocol";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wkennington ];
+  };
+}