From d697b79dcec9636466e01665341e57a063d944ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 Sep 2021 23:56:08 +0200 Subject: [PATCH 1/3] python3Packages.youless-api: init at 0.12 --- .../python-modules/youless-api/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/youless-api/default.nix diff --git a/pkgs/development/python-modules/youless-api/default.nix b/pkgs/development/python-modules/youless-api/default.nix new file mode 100644 index 000000000000..bce08bddf2b9 --- /dev/null +++ b/pkgs/development/python-modules/youless-api/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromBitbucket +, pythonOlder +, certifi +, chardet +, idna +, nose +, requests +, six +, urllib3 +}: + +buildPythonPackage rec { + pname = "youless-api"; + version = "0.12"; + + disabled = pythonOlder "3.7"; + + src = fetchFromBitbucket { + owner = "jongsoftdev"; + repo = "youless-python-bridge"; + rev = version; + sha256 = "18hymahpblq87i7lv479sizj8mgxawjhj31g4j1lyna1mds3887k"; + }; + + propagatedBuildInputs = [ + certifi + chardet + idna + requests + six + urllib3 + ]; + + checkInputs = [ + nose + ]; + + pythonImportsCheck = [ "youless_api" ]; + + meta = with lib; { + description = "Python library for YouLess sensors"; + homepage = "https://pypi.org/project/youless-api/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 70c1760da3cf..9463ac2ec0ee 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9610,6 +9610,8 @@ in { yoda = toPythonModule (pkgs.yoda.override { inherit python; }); + youless-api = callPackage ../development/python-modules/youless-api { }; + youtube-dl = callPackage ../tools/misc/youtube-dl { }; youtube-dl-light = callPackage ../tools/misc/youtube-dl { From 688e7ade2cce7df57c363d2199cce19e9a3d23c4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Sep 2021 00:00:36 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index da88c09c5b61..28285fa2ee37 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -993,7 +993,7 @@ "yeelight" = ps: with ps; [ yeelight ]; "yeelightsunflower" = ps: with ps; [ ]; # missing inputs: yeelightsunflower "yi" = ps: with ps; [ aioftp ha-ffmpeg ]; - "youless" = ps: with ps; [ ]; # missing inputs: youless-api + "youless" = ps: with ps; [ youless-api ]; "zabbix" = ps: with ps; [ ]; # missing inputs: py-zabbix "zamg" = ps: with ps; [ ]; "zengge" = ps: with ps; [ ]; # missing inputs: zengge From bccb933206a2b10bdacfc481b1f48c60878ec3af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Sep 2021 00:02:36 +0200 Subject: [PATCH 3/3] home-assistant: enable youless tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 7bf04b65c723..cc10491ffff2 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -722,6 +722,7 @@ in with py.pkgs; buildPythonApplication rec { "yandex_transport" "yandextts" "yeelight" + "youless" # disabled, because it tries to join a multicast group and fails to find a usable network interface # "zeroconf" "zerproc"