diff --git a/pkgs/development/python-modules/pyindego/default.nix b/pkgs/development/python-modules/pyindego/default.nix new file mode 100644 index 000000000000..b83aa414bc8c --- /dev/null +++ b/pkgs/development/python-modules/pyindego/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, fetchPypi + +# build-system +, setuptools + +# dependencies +, aiohttp +, requests +, pytz + +# tests +, mock +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyindego"; + version = "3.1.1"; + pyproject = true; + + src = fetchPypi { + pname = "pyIndego"; + inherit version; + hash = "sha256-lRDi6qYMaPI8SiSNe0vzlKb92axujt44aei8opNPDug="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + aiohttp + requests + pytz + ]; + + nativeCheckInputs = [ + mock + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + disabledTests = [ + # Typeerror, presumably outdated tests + "test_repr" + "test_client_response_errors" + "test_update_battery" + ]; + + pythonImportsCheck = [ + "pyIndego" + ]; + + meta = with lib; { + description = "Python interface for Bosch API for lawnmowers"; + homepage = "https://github.com/jm-73/pyIndego"; + changelog = "https://github.com/jm-73/pyIndego/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/servers/home-assistant/custom-components/default.nix b/pkgs/servers/home-assistant/custom-components/default.nix index aba723d24bc4..1a7f9d47e187 100644 --- a/pkgs/servers/home-assistant/custom-components/default.nix +++ b/pkgs/servers/home-assistant/custom-components/default.nix @@ -20,6 +20,8 @@ homematicip_local = callPackage ./homematicip_local { }; + indego = callPackage ./indego { }; + local_luftdaten = callPackage ./local_luftdaten { }; localtuya = callPackage ./localtuya {}; diff --git a/pkgs/servers/home-assistant/custom-components/indego/default.nix b/pkgs/servers/home-assistant/custom-components/indego/default.nix new file mode 100644 index 000000000000..657d8b80a862 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/indego/default.nix @@ -0,0 +1,30 @@ +{ + lib, + buildHomeAssistantComponent, + fetchFromGitHub, + pyindego, +}: + +buildHomeAssistantComponent rec { + owner = "jm-73"; + domain = "indego"; + version = "5.5.0"; + + src = fetchFromGitHub { + owner = "jm-73"; + repo = "Indego"; + rev = "refs/tags/${version}"; + hash = "sha256-ur6KOqU6KAseABL0ibpGJ6109wSSZq9HWSVbMIrRSqc="; + }; + + dependencies = [ pyindego ]; + + meta = with lib; { + description = "Bosch Indego lawn mower component"; + changelog = "https://github.com/jm-73/Indego/releases/tag/${version}"; + homepage = "https://github.com/jm-73/Indego"; + # https://github.com/jm-73/pyIndego/issues/125 + license = licenses.unfree; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2e41466ecbd2..c535b80ea53a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9842,6 +9842,8 @@ self: super: with self; { pyhumps = callPackage ../development/python-modules/pyhumps { }; + pyindego = callPackage ../development/python-modules/pyindego { }; + pyinstaller-versionfile = callPackage ../development/python-modules/pyinstaller-versionfile { }; pyisemail = callPackage ../development/python-modules/pyisemail { };