From f215ae9dab9d5e44da5b3dd185c75bea895713b6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 23:40:45 +0100 Subject: [PATCH 1/2] python3Packages.pyvera: init at 0.3.11 --- .../python-modules/pyvera/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/pyvera/default.nix diff --git a/pkgs/development/python-modules/pyvera/default.nix b/pkgs/development/python-modules/pyvera/default.nix new file mode 100644 index 000000000000..4415ca7c376d --- /dev/null +++ b/pkgs/development/python-modules/pyvera/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, pytest-cov +, pytest-asyncio +, pytest-timeout +, responses +, pytestCheckHook +, requests +}: + +buildPythonPackage rec { + pname = "pyvera"; + version = "0.3.11"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "pavoni"; + repo = pname; + rev = version; + sha256 = "0yi2cjd3jag95xa0k24f7d7agi26ywb3219a0j0k8l2nsx2sdi87"; + }; + + patches = [ + (fetchpatch { + # build-system section is missing https://github.com/pavoni/pyvera/pull/142 + url = "https://github.com/pavoni/pyvera/pull/142/commits/e90995a8d55107118d324e8cf189ddf1d9e3aa6c.patch"; + sha256 = "1psq3fiwg20kcwyybzh5g17dzn5fh29lhm238npyg846innbzgs7"; + }) + ]; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ requests ]; + + checkInputs = [ + pytest-asyncio + pytest-timeout + pytest-cov + pytestCheckHook + responses + ]; + + pythonImportsCheck = [ "pyvera" ]; + + meta = with lib; { + description = "Python library to control devices via the Vera hub"; + homepage = "https://github.com/pavoni/pyvera"; + license = with licenses; [ gpl2Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4c738a3cef9a..d1ba6e36439b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6348,6 +6348,8 @@ in { pyvcf = callPackage ../development/python-modules/pyvcf { }; + pyvera = callPackage ../development/python-modules/pyvera { }; + pyviz-comms = callPackage ../development/python-modules/pyviz-comms { }; pyvips = callPackage ../development/python-modules/pyvips { From 65590fb106443f5744c55f5bc82a6062073555b9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 23:41:54 +0100 Subject: [PATCH 2/2] 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 8404d6645e5a..7de19848b048 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -894,7 +894,7 @@ "velbus" = ps: with ps; [ ]; # missing inputs: python-velbus "velux" = ps: with ps; [ ]; # missing inputs: pyvlx "venstar" = ps: with ps; [ ]; # missing inputs: venstarcolortouch - "vera" = ps: with ps; [ ]; # missing inputs: pyvera + "vera" = ps: with ps; [ pyvera ]; "verisure" = ps: with ps; [ jsonpath ]; # missing inputs: vsure "versasense" = ps: with ps; [ ]; # missing inputs: pyversasense "version" = ps: with ps; [ pyhaversion ];