diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hidapi')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/hidapi/default.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/hidapi/default.nix b/nixpkgs/pkgs/development/libraries/hidapi/default.nix new file mode 100644 index 000000000000..11cdd0ab7e0c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/hidapi/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, systemd, libusb1 +, darwin }: + +stdenv.mkDerivation rec { + pname = "hidapi"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "libusb"; + repo = "hidapi"; + rev = "${pname}-${version}"; + sha256 = "1p4g8lgwj4rki6lbn5l6rvwj0xlbn1xfh4d255bg5pvgczmwmc4i"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ ] + ++ stdenv.lib.optionals stdenv.isLinux [ libusb1 systemd ]; + + 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"; + # Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal) + license = licenses.bsd3; + platforms = platforms.unix; + }; +} |