aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix
blob: a9c62673115a5df086d6359518fa65ba1a82e3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchurl, fetchpatch, pkgconfig, json_c, hidapi }:

stdenv.mkDerivation rec {
  pname = "libu2f-host";
  version = "1.1.10";

  src = fetchurl {
    url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.xz";
    sha256 = "0vrivl1dwql6nfi48z6dy56fwy2z13d7abgahgrs2mcmqng7hra2";
  };

  patches = [
    # remove after updating to next release
    (fetchpatch {
      name = "json-c-0.14-support.patch";
      url = "https://github.com/Yubico/libu2f-host/commit/840f01135d2892f45e71b9e90405de587991bd03.patch";
      sha256 = "0xplx394ppsbsb4h4l8b9m4dv9shbl0zyck3y26vbm9i1g981ki7";
    })
  ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ json_c hidapi ];

  doCheck = true;

  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 = with licenses; [ gpl3Plus lgpl21Plus ];
    platforms = platforms.unix;
  };
}