2021-03-16 08:12:58 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-08-02 20:14:19 +01:00
|
|
|
, pysnmp
|
2021-03-16 08:12:58 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-error-for-skips
|
|
|
|
, pytest-runner
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-08-02 20:14:19 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "brother";
|
2021-05-14 09:06:08 +01:00
|
|
|
version = "1.0.1";
|
2020-09-13 14:10:41 +01:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-08-02 20:14:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bieniu";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-14 09:06:08 +01:00
|
|
|
sha256 = "sha256-Cfut6Y4Hln32g4V13xbOo5JdjPv2cH6FCDqvRRyijIA=";
|
2020-08-02 20:14:19 +01:00
|
|
|
};
|
|
|
|
|
2021-05-14 09:06:08 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pytest-runner
|
|
|
|
];
|
|
|
|
|
2021-02-02 14:35:20 +00:00
|
|
|
postPatch = ''
|
2021-05-14 09:06:08 +01:00
|
|
|
substituteInPlace setup.cfg \
|
2021-03-16 08:12:58 +00:00
|
|
|
--replace "--cov --cov-report term-missing " ""
|
2021-02-02 14:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-02 20:14:19 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pysnmp
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
2021-03-16 08:12:58 +00:00
|
|
|
pytest-error-for-skips
|
|
|
|
pytestCheckHook
|
2020-08-02 20:14:19 +01:00
|
|
|
];
|
|
|
|
|
2021-03-16 08:12:58 +00:00
|
|
|
pythonImportsCheck = [ "brother" ];
|
|
|
|
|
2020-08-02 20:14:19 +01:00
|
|
|
meta = with lib; {
|
2021-03-16 08:12:58 +00:00
|
|
|
description = "Python wrapper for getting data from Brother laser and inkjet printers via SNMP";
|
2020-08-02 20:14:19 +01:00
|
|
|
homepage = "https://github.com/bieniu/brother";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|