From 0fdca0cc2f26816e1d07cb06af26e1f2184989a3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Apr 2022 22:37:43 +0200 Subject: [PATCH 1/2] python3Packages.oasatelematics: init at 0.3 --- .../python-modules/oasatelematics/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/oasatelematics/default.nix diff --git a/pkgs/development/python-modules/oasatelematics/default.nix b/pkgs/development/python-modules/oasatelematics/default.nix new file mode 100644 index 000000000000..c4d7ca121387 --- /dev/null +++ b/pkgs/development/python-modules/oasatelematics/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "oasatelematics"; + version = "0.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "panosmz"; + repo = pname; + rev = "v${version}"; + hash = "sha256-3O7XbNVj1S3ZwheklEhm0ivw16Tj7drML/xYC9383Kg="; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "oasatelematics" + ]; + + meta = with lib; { + description = "Python wrapper for the OASA Telematics API"; + homepage = "https://github.com/panosmz/oasatelematics"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 79ac7e75af7c..bd311f37efe8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5713,6 +5713,8 @@ in { nwdiag = callPackage ../development/python-modules/nwdiag { }; + oasatelematics = callPackage ../development/python-modules/oasatelematics { }; + oath = callPackage ../development/python-modules/oath { }; oauth2 = callPackage ../development/python-modules/oauth2 { }; From 1879daa085ff0969db78cfce0d0ba8a6553017bd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Apr 2022 22:39:26 +0200 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index e599ca6ab7cf..d3f4101be6ea 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1808,7 +1808,8 @@ "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi "oasa_telematics" = ps: with ps; [ - ]; # missing inputs: oasatelematics + oasatelematics + ]; "obihai" = ps: with ps; [ pyobihai ];