2021-02-12 18:49:29 +00:00
|
|
|
{ lib
|
|
|
|
, asynctest
|
|
|
|
, bleak
|
|
|
|
, click
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyzerproc";
|
2021-02-13 23:22:28 +00:00
|
|
|
version = "0.4.8";
|
2021-02-12 18:49:29 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "emlove";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-02-13 23:22:28 +00:00
|
|
|
sha256 = "sha256-PNvkgjPcBbnETjWpVF3De9O9IprdpCke0nWvJ9Tju1M=";
|
2021-02-12 18:49:29 +00:00
|
|
|
};
|
|
|
|
|
2021-02-13 23:22:28 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
2021-02-12 18:49:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bleak
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
2021-02-13 23:22:28 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
asynctest
|
2021-02-12 18:49:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|