1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 dacite,
6 pysnmp-lextudio,
7 pytest-asyncio,
8 pytest-error-for-skips,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "brother";
16 version = "4.1.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.11";
20
21 src = fetchFromGitHub {
22 owner = "bieniu";
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-W7bakj/94l0pL5fOb+CK+Z6k1cbv/CY9XjXGYZfLFY4=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 dacite
32 pysnmp-lextudio
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytest-error-for-skips
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "brother" ];
42
43 meta = with lib; {
44 description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
45 homepage = "https://github.com/bieniu/brother";
46 changelog = "https://github.com/bieniu/brother/releases/tag/${version}";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ hexa ];
49 };
50}