2020-08-20 17:08:02 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
|
|
|
, pysnmp
|
|
|
|
, asynctest, pytestcov, pytestrunner, pytest-asyncio, pytest-trio, pytest-tornasync }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "brother";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "0.2.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bieniu";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "0d984apw73kzd6bid65bqhp26gvvgqjni56nqr0gnb2sv7mknnm8";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# pytest-error-for-skips is not packaged
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --error-for-skips" ""
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "\"pytest-error-for-skips\"" ""
|
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pysnmp
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
pytestcov
|
|
|
|
pytestrunner
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-trio
|
|
|
|
pytest-tornasync
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|