1{ pkgs, lib, fetchurl, buildDunePackage, pkg-config, dune-configurator
2, bigstring,
3}:
4
5buildDunePackage rec {
6 pname = "hidapi";
7 version = "1.1.1";
8
9 useDune2 = true;
10
11 src = fetchurl {
12 url = "https://github.com/vbmithr/ocaml-hidapi/releases/download/${version}/${pname}-${version}.tbz";
13 sha256 = "1j7rd7ajrzla76r3sxljx6fb18f4f4s3jd7vhv59l2ilxyxycai2";
14 };
15
16 strictDeps = true;
17
18 minimumOCamlVersion = "4.03";
19
20 nativeBuildInputs = [ pkg-config ];
21 buildInputs = [ pkgs.hidapi dune-configurator ];
22 propagatedBuildInputs = [ bigstring ];
23
24 doCheck = true;
25
26 meta = with lib; {
27 description = "Bindings to Signal11's hidapi library";
28 homepage = "https://github.com/vbmithr/ocaml-hidapi";
29 license = licenses.isc;
30 maintainers = [ maintainers.alexfmpe ];
31 mainProgram = "ocaml-hid-enumerate";
32 };
33}