|
|
|
@ -1,37 +1,29 @@ |
|
|
|
|
{ lib |
|
|
|
|
, buildPythonPackage |
|
|
|
|
, fetchFromGitHub |
|
|
|
|
, pysnmp |
|
|
|
|
, pysnmplib |
|
|
|
|
, pytest-asyncio |
|
|
|
|
, pytest-error-for-skips |
|
|
|
|
, pytest-runner |
|
|
|
|
, pytestCheckHook |
|
|
|
|
, pythonOlder |
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
buildPythonPackage rec { |
|
|
|
|
pname = "brother"; |
|
|
|
|
version = "1.1.0"; |
|
|
|
|
version = "1.2.0"; |
|
|
|
|
format = "setuptools"; |
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8"; |
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
|
owner = "bieniu"; |
|
|
|
|
repo = pname; |
|
|
|
|
rev = version; |
|
|
|
|
sha256 = "sha256-ZDQIpzdr3XkYrSUgrBDZsUwUZRQCdJdvmniMezvJxzU="; |
|
|
|
|
hash = "sha256-hKOZ5pTDwhM0lOXoatXXVvEVxiTfxIpBRe3fFcUfzwE="; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ |
|
|
|
|
pytest-runner |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
postPatch = '' |
|
|
|
|
substituteInPlace setup.cfg \ |
|
|
|
|
--replace "--cov --cov-report term-missing " "" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ |
|
|
|
|
pysnmp |
|
|
|
|
pysnmplib |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
checkInputs = [ |
|
|
|
@ -40,7 +32,16 @@ buildPythonPackage rec { |
|
|
|
|
pytestCheckHook |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "brother" ]; |
|
|
|
|
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"; |
|
|
|
|