diff --git a/pkgs/development/python-modules/librehardwaremonitor-api/default.nix b/pkgs/development/python-modules/librehardwaremonitor-api/default.nix new file mode 100644 index 000000000000..8e41c7041328 --- /dev/null +++ b/pkgs/development/python-modules/librehardwaremonitor-api/default.nix @@ -0,0 +1,40 @@ +{ + aiohttp, + buildPythonPackage, + fetchFromGitHub, + lib, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "librehardwaremonitor-api"; + version = "1.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Sab44"; + repo = "librehardwaremonitor-api"; + tag = "v${version}"; + hash = "sha256-yYJOizO6blfwRBWD9oFnaein7DK1F8Kl744ErehXU0Q="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + ]; + + pythonImportsCheck = [ "librehardwaremonitor_api" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = { + description = "Python API client for LibreHardwareMonitor"; + homepage = "https://github.com/Sab44/librehardwaremonitor-api"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.dotlambda ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index e02277331f0d..d8b05c3a638c 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -3282,7 +3282,8 @@ ]; "libre_hardware_monitor" = ps: with ps; [ - ]; # missing inputs: librehardwaremonitor-api + librehardwaremonitor-api + ]; "lidarr" = ps: with ps; [ aiopyarr @@ -7450,6 +7451,7 @@ "lg_netcast" "lg_soundbar" "lg_thinq" + "libre_hardware_monitor" "lidarr" "life360" "lifx" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ab0840b733e0..5b7836b23f1f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8377,6 +8377,8 @@ self: super: with self; { } ); + librehardwaremonitor-api = callPackage ../development/python-modules/librehardwaremonitor-api { }; + librepo = lib.pipe pkgs.librepo [ toPythonModule (