hidapi: Add meta.pkgConfigModules
and test
This commit is contained in:
parent
14cb2130bb
commit
205293d8a9
@ -7,16 +7,17 @@
|
||||
, udev
|
||||
, Cocoa
|
||||
, IOKit
|
||||
, testers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hidapi";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libusb";
|
||||
repo = "hidapi";
|
||||
rev = "${pname}-${version}";
|
||||
rev = "${finalAttrs.pname}-${finalAttrs.version}";
|
||||
sha256 = "sha256-SMhlcB7LcViC6UFVYACjunxsGkvSOKC3mbLBH4XQSzM=";
|
||||
};
|
||||
|
||||
@ -28,12 +29,20 @@ stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Cocoa IOKit ];
|
||||
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for communicating with USB and Bluetooth HID devices";
|
||||
homepage = "https://github.com/libusb/hidapi";
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
# You can choose between GPLv3, BSD or HIDAPI license (even more liberal)
|
||||
license = with licenses; [ bsd3 /* or */ gpl3Only ] ;
|
||||
pkgConfigModules = lib.optionals stdenv.isDarwin [
|
||||
"hidapi"
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
"hidapi-hidraw"
|
||||
"hidapi-libusb"
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user