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-04-09 12:36:18 +01:00
|
|
|
version = "0.4.6";
|
2021-01-05 14:31:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sbidy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-09 12:36:18 +01:00
|
|
|
sha256 = "sha256-BCHLd1SbdHWrl7dcLD69t2K5Sa1WtGpMxTmMyDWl9u4=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|