2019-08-28 09:58:18 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, systemd, libusb
|
2017-03-13 18:23:41 +00:00
|
|
|
, darwin }:
|
2014-10-25 00:35:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-28 09:58:18 +01:00
|
|
|
pname = "hidapi";
|
|
|
|
version = "0.9.0";
|
2014-10-25 00:35:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-08-28 09:58:18 +01:00
|
|
|
owner = "libusb";
|
2014-10-25 00:35:01 +01:00
|
|
|
repo = "hidapi";
|
2019-08-28 09:58:18 +01:00
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "1p4g8lgwj4rki6lbn5l6rvwj0xlbn1xfh4d255bg5pvgczmwmc4i";
|
2014-10-25 00:35:01 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
2019-08-28 09:58:18 +01:00
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ ]
|
2019-08-28 09:58:18 +01:00
|
|
|
++ stdenv.lib.optionals stdenv.isLinux [ libusb systemd ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2017-03-13 18:23:41 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]);
|
2014-10-25 00:35:01 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2014-12-07 15:14:07 +00:00
|
|
|
description = "Library for communicating with USB and Bluetooth HID devices";
|
2019-08-28 09:58:18 +01:00
|
|
|
homepage = "https://github.com/libusb/hidapi";
|
2014-12-07 15:15:52 +00:00
|
|
|
# Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
|
2014-10-25 00:35:01 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|