2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2021-08-08 23:34:03 +00:00
|
|
|
, assertpy
|
2021-01-15 22:18:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-04 09:07:49 +00:00
|
|
|
, poetry-core
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
, pytest-mockservers
|
|
|
|
, pytest-resource-path
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-sugar
|
|
|
|
, pytestCheckHook
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2021-08-08 23:34:03 +00:00
|
|
|
, time-machine
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioswitcher";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "3.4.0";
|
2021-01-15 22:18:51 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TomerFi";
|
|
|
|
repo = pname;
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-coTENnNX8GFLstpQtuJOC8050llW4QuLiutYARDWaSo=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
preCheck = ''
|
|
|
|
export TZ=Asia/Jerusalem
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-08 23:34:03 +00:00
|
|
|
assertpy
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
pytest-mockservers
|
|
|
|
pytest-resource-path
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-sugar
|
|
|
|
pytestCheckHook
|
2021-08-08 23:34:03 +00:00
|
|
|
time-machine
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Expected <14:00> to be equal to <17:00>, but was not.
|
|
|
|
"test_schedule_parser_with_a_weekly_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_daily_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_partial_daily_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_non_recurring_enabled_schedule_data"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_hexadecimale_timestamp_to_localtime_with_the_current_timestamp_should_return_a_time_string"
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioswitcher"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to interact with Switcher water heater";
|
|
|
|
homepage = "https://github.com/TomerFi/aioswitcher";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/TomerFi/aioswitcher/releases/tag/${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|