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