depot/third_party/nixpkgs/pkgs/development/libraries/hidapi/default.nix
Default email 9a250f78df Project import generated by Copybara.
GitOrigin-RevId: 8536aeb4154f5458994080bc4cf542695c144739
2020-05-03 19:38:23 +02:00

31 lines
929 B
Nix

{ 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;
};
}