2021-01-05 14:31:21 +00:00
|
|
|
{ lib
|
|
|
|
, asyncio-dgram
|
2021-02-11 14:11:58 +00:00
|
|
|
, buildPythonPackage
|
2021-01-05 14:31:21 +00:00
|
|
|
, click
|
2021-02-11 14:11:58 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-01-05 14:31:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywizlight";
|
2021-02-12 07:33:15 +00:00
|
|
|
version = "0.4.5";
|
2021-01-05 14:31:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sbidy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-12 07:33:15 +00:00
|
|
|
sha256 = "sha256-E2rpkdj93LymlkST8HgZ+8VcJFOWwz8787NPfTCSXFY=";
|
2021-01-05 14:31:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asyncio-dgram
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
2021-02-11 14:11:58 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests requires network features (e. g., discovery testing)
|
|
|
|
disabledTests = [
|
|
|
|
"test_Bulb_Discovery"
|
|
|
|
"test_timeout"
|
|
|
|
"test_timeout_PilotBuilder"
|
|
|
|
];
|
|
|
|
|
2021-01-05 14:31:21 +00:00
|
|
|
pythonImportsCheck = [ "pywizlight" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python connector for WiZ light bulbs";
|
|
|
|
homepage = "https://github.com/sbidy/pywizlight";
|
2021-02-11 14:11:58 +00:00
|
|
|
changelog = "https://github.com/sbidy/pywizlight/releases/tag/v${version}";
|
2021-01-05 14:31:21 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|