Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.7 KiB
Nix
66 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
buildHomeAssistantComponent,
|
|
fetchFromGitHub,
|
|
pyhaversion,
|
|
nix-update-script,
|
|
# Test dependencies
|
|
pytestCheckHook,
|
|
pytest-homeassistant-custom-component,
|
|
aiohttp-cors,
|
|
paho-mqtt,
|
|
}:
|
|
let
|
|
version = "2.3.2";
|
|
in
|
|
buildHomeAssistantComponent {
|
|
owner = "IATkachenko";
|
|
domain = "sleep_as_android";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "IATkachenko";
|
|
repo = "HA-SleepAsAndroid";
|
|
tag = "v${version}";
|
|
hash = "sha256-aJKjHZcRdmiXJdtWRY4fv5oxCHTDIVpvZEwhIE9ISv8=";
|
|
};
|
|
|
|
dependencies = [
|
|
pyhaversion
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-homeassistant-custom-component
|
|
aiohttp-cors
|
|
paho-mqtt
|
|
];
|
|
|
|
pytestFlags = [
|
|
# Fixes `AttributeError: 'async_generator' object has no attribute 'data'`
|
|
# See https://github.com/MatthewFlamm/pytest-homeassistant-custom-component/issues/158
|
|
"--asyncio-mode=auto"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Broken on upstream, see https://github.com/IATkachenko/HA-SleepAsAndroid/issues/85
|
|
# AttributeError: module 'homeassistant.data_entry_flow' has no attribute 'RESULT_TYPE_FORM'
|
|
"test_successful_config_flow"
|
|
"test_options_flow"
|
|
|
|
# Likely fails due to --asyncio-mode=auto
|
|
# TypeError: object MagicMock can't be used in 'await' expression
|
|
"test_async_setup_entry"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Sleep As Android integration for Home Assistant";
|
|
homepage = "https://github.com/IATkachenko/HA-SleepAsAndroid";
|
|
changelog = "https://github.com/IATkachenko/HA-SleepAsAndroid/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ blenderfreaky ];
|
|
};
|
|
}
|