1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytestCheckHook,
7 pytest-cov-stub,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "usb-devices";
13 version = "0.4.5";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "Bluetooth-Devices";
20 repo = "usb-devices";
21 tag = "v${version}";
22 hash = "sha256-Nfdl5oRIdOfAo5PFAJJpadRyu2zeEkmYzxDQxbvpt6c=";
23 };
24
25 nativeBuildInputs = [ poetry-core ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 pytest-cov-stub
30 ];
31
32 pythonImportsCheck = [ "usb_devices" ];
33
34 meta = with lib; {
35 description = "Library for for mapping, describing, and resetting USB devices";
36 homepage = "https://github.com/Bluetooth-Devices/usb-devices";
37 changelog = "https://github.com/Bluetooth-Devices/usb-devices/blob/v${version}/CHANGELOG.md";
38 license = with licenses; [ mit ];
39 maintainers = with maintainers; [ fab ];
40 };
41}