From 6e72b95a9372ee1ae2a8f5eea1f43916c467ccd3 Mon Sep 17 00:00:00 2001 From: Marco Orovecchia Date: Fri, 20 Mar 2020 12:43:07 +0100 Subject: [PATCH] pythonPackages.aioharmony: init at 0.2.1 --- .../python-modules/aioharmony/default.nix | 28 +++++++++++++++++++ .../home-assistant/component-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/aioharmony/default.nix diff --git a/pkgs/development/python-modules/aioharmony/default.nix b/pkgs/development/python-modules/aioharmony/default.nix new file mode 100644 index 000000000000..13769bbeaed3 --- /dev/null +++ b/pkgs/development/python-modules/aioharmony/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, slixmpp, async-timeout, aiohttp }: + +buildPythonPackage rec { + pname = "aioharmony"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "8c8f6e3b776e4e7eba5a1d2ae739aac6a1dd558a7f15951c34ffe0ee28f7f538"; + }; + + disabled = !isPy3k; + + #aioharmony does not seem to include tests + doCheck = false; + + pythonImportsCheck = [ "aioharmony.harmonyapi" "aioharmony.harmonyclient" ]; + + propagatedBuildInputs = [ slixmpp async-timeout aiohttp ]; + + meta = with lib; { + homepage = "https://github.com/ehendrix23/aioharmony"; + description = + "Asyncio Python library for connecting to and controlling the Logitech Harmony"; + license = licenses.asl20; + maintainers = with maintainers; [ oro ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 906ba777a6b6..8b1988f549fd 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -310,7 +310,7 @@ "habitica" = ps: with ps; [ ]; # missing inputs: habitipy "hangouts" = ps: with ps; [ ]; # missing inputs: hangups "harman_kardon_avr" = ps: with ps; [ ]; # missing inputs: hkavr - "harmony" = ps: with ps; [ ]; # missing inputs: aioharmony + "harmony" = ps: with ps; [ aioharmony]; "hassio" = ps: with ps; [ aiohttp-cors]; "haveibeenpwned" = ps: with ps; [ ]; "hddtemp" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e16cc830fc2b..74cad29c8aa2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1619,6 +1619,8 @@ in { aioftp = callPackage ../development/python-modules/aioftp { }; + aioharmony = callPackage ../development/python-modules/aioharmony { }; + aiohttp = callPackage ../development/python-modules/aiohttp { }; aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { };