From bf6d5f3d0ff74e9d3d32bfd7aafc252257d03a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 23:43:59 +0200 Subject: [PATCH 1/3] python3Packages.emulated-roku: init at 0.2.1 --- .../python-modules/emulated-roku/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/emulated-roku/default.nix diff --git a/pkgs/development/python-modules/emulated-roku/default.nix b/pkgs/development/python-modules/emulated-roku/default.nix new file mode 100644 index 000000000000..3a9da2ba8e37 --- /dev/null +++ b/pkgs/development/python-modules/emulated-roku/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +}: + +buildPythonPackage rec { + pname = "emulated-roku"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "mindigmarton"; + repo = "emulated_roku"; + rev = version; + sha256 = "02cbg5wrph19p6x44jlw6cn3jli0kwbgfh6klb3c4k5jfrkhgghw"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ "emulated_roku" ]; + + meta = with lib; { + description = "Library to emulate a roku server to serve as a proxy for remotes such as Harmony"; + homepage = "https://github.com/mindigmarton/emulated_roku"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4b258efcc92b..a6ebffcb8918 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2265,6 +2265,8 @@ in { emoji = callPackage ../development/python-modules/emoji { }; + emulated-roku = callPackage ../development/python-modules/emulated-roku { }; + enaml = callPackage ../development/python-modules/enaml { }; enamlx = callPackage ../development/python-modules/enamlx { }; From 4fb1db2d7333d66e08c5162360bf40fedf86ce90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 23:44:53 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- 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 34db3b64dfd6..1a0d0b0f89f1 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -223,7 +223,7 @@ "emonitor" = ps: with ps; [ aioemonitor ]; "emulated_hue" = ps: with ps; [ aiohttp-cors ]; "emulated_kasa" = ps: with ps; [ sense-energy ]; - "emulated_roku" = ps: with ps; [ ]; # missing inputs: emulated_roku + "emulated_roku" = ps: with ps; [ emulated-roku ]; "enigma2" = ps: with ps; [ openwebifpy ]; "enocean" = ps: with ps; [ enocean ]; "enphase_envoy" = ps: with ps; [ envoy-reader ]; From 3b35637fdc6a34bc3e1017662424b81054c6a12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 23:47:19 +0200 Subject: [PATCH 3/3] home-assistant: test emulated_roku component --- 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 1f52ca95d732..87fdb9f42316 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -372,6 +372,7 @@ in with py.pkgs; buildPythonApplication rec { "emonitor" "emulated_hue" "emulated_kasa" + "emulated_roku" "enocean" "enphase_envoy" "epson"