blob: df8212cd5a65299604653d07876069f891687fca (
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, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb1
, darwin }:
stdenv.mkDerivation rec {
pname = "hidapi";
version = "0.10.0";
src = fetchFromGitHub {
owner = "libusb";
repo = "hidapi";
rev = "${pname}-${version}";
sha256 = "1n3xn1zvxgyzb84cjpw3i5alw0gkbrps11r4ijxzyqxqym0khagr";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];
enableParallelBuilding = true;
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]);
meta = with stdenv.lib; {
description = "Library for communicating with USB and Bluetooth HID devices";
homepage = "https://github.com/libusb/hidapi";
maintainers = with maintainers; [ prusnak ];
# Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
license = licenses.bsd3;
platforms = platforms.unix;
};
}
|