2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
|
|
|
, asyncio-dgram
|
2021-02-13 14:23:35 +00:00
|
|
|
, buildPythonPackage
|
2021-01-05 17:05:55 +00:00
|
|
|
, click
|
2021-02-13 14:23:35 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywizlight";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.4.13";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sbidy";
|
|
|
|
repo = pname;
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-XO9KmsC3DXgVcGWr5ss3m2wB8rVboWyQUWBidynhkP8=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asyncio-dgram
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-12-06 16:07:01 +00:00
|
|
|
# Tests requires network features (e. g., discovery testing)
|
2021-02-13 14:23:35 +00:00
|
|
|
"test_Bulb_Discovery"
|
|
|
|
"test_timeout"
|
|
|
|
"test_timeout_PilotBuilder"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pywizlight"
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python connector for WiZ light bulbs";
|
|
|
|
homepage = "https://github.com/sbidy/pywizlight";
|
2021-02-13 14:23:35 +00:00
|
|
|
changelog = "https://github.com/sbidy/pywizlight/releases/tag/v${version}";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|