at 22.05-pre 32 lines 959 B view raw
1{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, udev, libusb1 2, darwin }: 3 4stdenv.mkDerivation rec { 5 pname = "hidapi"; 6 version = "0.10.1"; 7 8 src = fetchFromGitHub { 9 owner = "libusb"; 10 repo = "hidapi"; 11 rev = "${pname}-${version}"; 12 sha256 = "1nr4z4b10vpbh3ss525r7spz4i43zim2ba5qzfl15dgdxshxxivb"; 13 }; 14 15 nativeBuildInputs = [ autoreconfHook pkg-config ]; 16 17 buildInputs = [ ] 18 ++ lib.optionals stdenv.isLinux [ libusb1 udev ]; 19 20 enableParallelBuilding = true; 21 22 propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]); 23 24 meta = with lib; { 25 description = "Library for communicating with USB and Bluetooth HID devices"; 26 homepage = "https://github.com/libusb/hidapi"; 27 maintainers = with maintainers; [ prusnak ]; 28 # Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal) 29 license = licenses.bsd3; 30 platforms = platforms.unix; 31 }; 32}