fix(hass): more consistent builds

This commit is contained in:
arcnmx 2024-01-25 08:19:37 -08:00
parent eae99a6dba
commit d875fa73ca
2 changed files with 24 additions and 3 deletions

View file

@ -7,7 +7,7 @@
cfg = config.services.home-assistant;
inherit (lib.modules) mkIf mkMerge mkBefore mkDefault;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.lists) optional optionals elem;
inherit (lib.lists) optional optionals elem unique;
inherit (lib.strings) toLower;
in {
options.services.home-assistant = with lib.types; {
@ -152,13 +152,21 @@ in {
then lib.warn "brother override no longer needed" true
else true;
});
mpd2 = super.mpd2.overridePythonAttrs (old: {
patches = old.patches or [ ] ++ [
../../packages/mpd2-skip-flaky-test.patch
];
disabledTests = unique (old.disabledTests or [ ] ++ [
"test_idle_timeout"
]);
});
};
};
in home-assistant.overrideAttrs (old: {
makeWrapperArgs = old.makeWrapperArgs ++ optional (cfg.brother.enable && needsPyasn1pin) "--prefix PYTHONPATH : ${pyasn1prefix}";
disabledTests = old.disabledTests or [ ] ++ [
disabledTests = unique (old.disabledTests or [ ] ++ [
"test_check_config"
];
]);
});
extraPackages = python3Packages: with python3Packages; mkMerge [
[

View file

@ -0,0 +1,13 @@
diff --git a/mpd/tests.py b/mpd/tests.py
index 9789c86..469133e 100755
--- a/mpd/tests.py
+++ b/mpd/tests.py
@@ -1555,7 +1555,7 @@ class TestAsyncioMPD(unittest.IsolatedAsyncioTestCase):
self.client.disconnect()
@unittest.skipIf(
- sys.version_info >= (3, 12),
+ sys.version_info >= (3, 11),
"In Python 3.12 we see a timeout error triggering idle instead of the bug described in https://github.com/Mic92/python-mpd2/pull/199",
)
async def test_idle_timeout(self) -> None: