about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/hidapi
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hidapi')
-rw-r--r--nixpkgs/pkgs/development/libraries/hidapi/default.nix27
1 files changed, 27 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..05e180161c0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hidapi/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb
+, darwin }:
+
+stdenv.mkDerivation rec {
+  name = "hidapi-0.8.0-rc1";
+
+  src = fetchFromGitHub {
+    owner = "signal11";
+    repo = "hidapi";
+    rev = name;
+    sha256 = "13d5jkmh9nh4c2kjch8k8amslnxapa9vkqzrk1z6rqmw8qgvzbkj";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ udev libusb ];
+
+  propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]);
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/signal11/hidapi;
+    description = "Library for communicating with USB and Bluetooth HID devices";
+    # Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}