Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / brother / default.nix
blobe4f9d63bd6b17c48c30a184cfe3e25299807e5ed
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pysnmp
5 , pytest-asyncio
6 , pytest-error-for-skips
7 , pytest-runner
8 , pytest-tornasync
9 , pytest-trio
10 , pytestCheckHook
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "brother";
16   version = "0.2.2";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "bieniu";
21     repo = pname;
22     rev = version;
23     sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE=";
24   };
26   postPatch = ''
27     substituteInPlace pytest.ini \
28       --replace "--cov --cov-report term-missing " ""
29     substituteInPlace requirements-test.txt \
30       --replace "pytest-cov" ""
31   '';
33   propagatedBuildInputs = [
34     pysnmp
35   ];
37   checkInputs = [
38     pytest-asyncio
39     pytest-error-for-skips
40     pytest-runner
41     pytest-tornasync
42     pytest-trio
43     pytestCheckHook
44   ];
46   pythonImportsCheck = [ "brother" ];
48   meta = with lib; {
49     description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
50     homepage = "https://github.com/bieniu/brother";
51     license = licenses.asl20;
52     maintainers = with maintainers; [ hexa ];
53   };