1{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb
2, darwin }:
3
4stdenv.mkDerivation rec {
5 name = "hidapi-0.8.0-rc1";
6
7 src = fetchFromGitHub {
8 owner = "signal11";
9 repo = "hidapi";
10 rev = name;
11 sha256 = "13d5jkmh9nh4c2kjch8k8amslnxapa9vkqzrk1z6rqmw8qgvzbkj";
12 };
13
14 buildInputs = [ autoreconfHook pkgconfig ]
15 ++ stdenv.lib.optionals stdenv.isLinux [ udev libusb ];
16
17 propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]);
18
19 meta = with stdenv.lib; {
20 homepage = https://github.com/signal11/hidapi;
21 description = "Library for communicating with USB and Bluetooth HID devices";
22 # Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
23 license = licenses.bsd3;
24 platforms = platforms.unix;
25 maintainers = with maintainers; [ wkennington ];
26 };
27}