nixpkgs-suyu/pkgs/development/python-modules/brother/default.nix
2022-04-16 23:29:51 +02:00

52 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pysnmplib
, pytest-asyncio
, pytest-error-for-skips
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "brother";
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bieniu";
repo = pname;
rev = version;
hash = "sha256-hKOZ5pTDwhM0lOXoatXXVvEVxiTfxIpBRe3fFcUfzwE=";
};
propagatedBuildInputs = [
pysnmplib
];
checkInputs = [
pytest-asyncio
pytest-error-for-skips
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov --cov-report term-missing " ""
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
pythonImportsCheck = [
"brother"
];
meta = with lib; {
description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
homepage = "https://github.com/bieniu/brother";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}