depot/third_party/nixpkgs/pkgs/development/libraries/hidapi/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

31 lines
927 B
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, systemd, libusb
, 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 [ libusb 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;
};
}