depot/third_party/nixpkgs/pkgs/development/python-modules/pyzerproc/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

55 lines
1,010 B
Nix

{ lib
, asynctest
, bleak
, click
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyzerproc";
version = "0.4.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "emlove";
repo = pname;
rev = version;
sha256 = "sha256-sfxyHpJzYYwxLsvfJpqI6cC/CKS7Jx0vXSLL3QD9qV4=";
};
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
propagatedBuildInputs = [
bleak
click
];
checkInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
] ++ lib.optionals (pythonOlder "3.8") [
asynctest
];
pythonImportsCheck = [
"pyzerproc"
];
meta = with lib; {
description = "Python library to control Zerproc Bluetooth LED smart string lights";
homepage = "https://github.com/emlove/pyzerproc";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}