depot/third_party/nixpkgs/pkgs/development/python-modules/brother/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

51 lines
998 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pysnmp
, pytest-asyncio
, pytest-error-for-skips
, pytest-runner
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "brother";
version = "1.0.2";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bieniu";
repo = pname;
rev = version;
sha256 = "sha256-xs/GIsJUuKKbDotV1BeT/ng86UVkNsH48uHR4i3vqow=";
};
nativeBuildInputs = [
pytest-runner
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov --cov-report term-missing " ""
'';
propagatedBuildInputs = [
pysnmp
];
checkInputs = [
pytest-asyncio
pytest-error-for-skips
pytestCheckHook
];
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 ];
};
}