nixpkgs-suyu/pkgs/development/libraries/hidapi/default.nix

33 lines
975 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, udev, libusb1
2017-03-13 19:23:41 +01:00
, darwin }:
2014-10-25 01:35:01 +02:00
stdenv.mkDerivation rec {
2019-08-28 10:58:18 +02:00
pname = "hidapi";
2020-11-26 08:02:19 +01:00
version = "0.10.1";
2014-10-25 01:35:01 +02:00
src = fetchFromGitHub {
2019-08-28 10:58:18 +02:00
owner = "libusb";
2014-10-25 01:35:01 +02:00
repo = "hidapi";
2019-08-28 10:58:18 +02:00
rev = "${pname}-${version}";
2020-11-26 08:02:19 +01:00
sha256 = "1nr4z4b10vpbh3ss525r7spz4i43zim2ba5qzfl15dgdxshxxivb";
2014-10-25 01:35:01 +02:00
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
2019-08-28 10:58:18 +02:00
buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];
2019-08-28 10:58:18 +02:00
enableParallelBuilding = true;
2017-03-13 19:23:41 +01:00
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit Cocoa ]);
2014-10-25 01:35:01 +02:00
meta = with stdenv.lib; {
description = "Library for communicating with USB and Bluetooth HID devices";
2019-08-28 10:58:18 +02:00
homepage = "https://github.com/libusb/hidapi";
2020-10-28 14:53:44 +01:00
maintainers = with maintainers; [ prusnak ];
# Actually, you can chose between GPLv3, BSD or HIDAPI license (more liberal)
2014-10-25 01:35:01 +02:00
license = licenses.bsd3;
platforms = platforms.unix;
};
}