depot/third_party/nixpkgs/pkgs/development/libraries/hidapi/default.nix
Default email 78efc47b99 Project import generated by Copybara.
GitOrigin-RevId: 83cbad92d73216bb0d9187c56cce0b91f9121d5a
2020-12-07 07:45:13 +00:00

32 lines
973 B
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb1
, darwin }:
stdenv.mkDerivation rec {
pname = "hidapi";
version = "0.10.1";
src = fetchFromGitHub {
owner = "libusb";
repo = "hidapi";
rev = "${pname}-${version}";
sha256 = "1nr4z4b10vpbh3ss525r7spz4i43zim2ba5qzfl15dgdxshxxivb";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];
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";
maintainers = with maintainers; [ prusnak ];
# Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
license = licenses.bsd3;
platforms = platforms.unix;
};
}