From 2430a647eb1f6737e749b08c67c1f83023d2ce72 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 23:29:09 +0100 Subject: [PATCH 1/2] python3Packages.pymfy: init at 0.9.4 --- .../python-modules/pymfy/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/pymfy/default.nix diff --git a/pkgs/development/python-modules/pymfy/default.nix b/pkgs/development/python-modules/pymfy/default.nix new file mode 100644 index 000000000000..32483eea7b9a --- /dev/null +++ b/pkgs/development/python-modules/pymfy/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpretty +, poetry-core +, pytestCheckHook +, pythonOlder +, requests +, requests_oauthlib +}: + +buildPythonPackage rec { + pname = "pymfy"; + version = "0.9.4"; + format = "pyproject"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "tetienne"; + repo = "somfy-open-api"; + rev = "v${version}"; + sha256 = "1ml536dvva2xd52jfgrd557h2sr5w6567sxnyq0blhkgpyz4m2av"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + requests + requests_oauthlib + ]; + + checkInputs = [ + httpretty + pytestCheckHook + ]; + + pythonImportsCheck = [ "pymfy" ]; + + meta = with lib; { + description = "Python client for the Somfy Open API"; + homepage = "https://github.com/tetienne/somfy-open-api"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c8229a8c61bf..8d51190bf976 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5710,6 +5710,8 @@ in { pymitv = callPackage ../development/python-modules/pymitv { }; + pymfy = callPackage ../development/python-modules/pymfy { }; + pymodbus = callPackage ../development/python-modules/pymodbus { }; pymongo = callPackage ../development/python-modules/pymongo { }; From 8803ddd31602c7fd3d66d1e553c961c6efdc6d0f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 23:30:00 +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 b2427bb69f59..90a2d5116f6b 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -763,7 +763,7 @@ "solarlog" = ps: with ps; [ ]; # missing inputs: sunwatcher "solax" = ps: with ps; [ solax ]; "soma" = ps: with ps; [ pysoma ]; - "somfy" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pymfy + "somfy" = ps: with ps; [ aiohttp-cors pymfy ]; "somfy_mylink" = ps: with ps; [ ]; # missing inputs: somfy-mylink-synergy "sonarr" = ps: with ps; [ ]; # missing inputs: sonarr "songpal" = ps: with ps; [ ]; # missing inputs: python-songpal