summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/aresponses/default.nix38
-rw-r--r--pkgs/development/python-modules/pyhaversion/default.nix43
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix4
4 files changed, 86 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/aresponses/default.nix b/pkgs/development/python-modules/aresponses/default.nix
new file mode 100644
index 00000000000..9e64d2f65ff
--- /dev/null
+++ b/pkgs/development/python-modules/aresponses/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+# propagatedBuildInputs
+, aiohttp
+# buildInputs
+, pytest
+, pytest-asyncio
+}:
+
+buildPythonPackage rec {
+  pname = "aresponses";
+  version = "1.1.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "d1d6ef52b9a97142d106688cf9b112602ef3dc66f6368de8f91f47241d8cfc9c";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+  ];
+
+  buildInputs = [
+    pytest
+    pytest-asyncio
+  ];
+
+  # tests only distributed via git repository, not pypi
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Asyncio testing server";
+    homepage = "https://github.com/circleup/aresponses";
+    license = licenses.mit;
+    maintainers = [ maintainers.makefu ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyhaversion/default.nix b/pkgs/development/python-modules/pyhaversion/default.nix
new file mode 100644
index 00000000000..73de6ba0839
--- /dev/null
+++ b/pkgs/development/python-modules/pyhaversion/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+# propagatedBuildInputs
+, aiohttp
+, async-timeout
+# buildInputs
+, pytestrunner
+# checkInputs
+, pytest
+, pytest-asyncio
+, aresponses
+}:
+buildPythonPackage rec {
+  pname = "pyhaversion";
+  version = "3.1.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1d4smpzlaw0sqfgkgvhxsn8h7bmwj8h9gj98sdzvkzhp5vhd96b2";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+  ];
+
+  buildInputs = [
+    pytestrunner
+  ];
+
+  checkInputs = [
+    pytest
+    pytest-asyncio
+    aresponses
+  ];
+
+  meta = with lib; {
+    description = "A python module to the newest version number of Home Assistant";
+    homepage = https://github.com/ludeeus/pyhaversion;
+    maintainers = [ maintainers.makefu ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 9ea2aa7ae8e..f28a5d01b33 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -807,7 +807,7 @@
     "venstar" = ps: with ps; [  ];
     "vera" = ps: with ps; [  ];
     "verisure" = ps: with ps; [  ];
-    "version" = ps: with ps; [  ];
+    "version" = ps: with ps; [ pyhaversion ];
     "vesync" = ps: with ps; [  ];
     "viaggiatreno" = ps: with ps; [  ];
     "vicare" = ps: with ps; [  ];
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 07779c38f87..1614c92808f 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -175,6 +175,8 @@ in {
 
   apprise = callPackage ../development/python-modules/apprise { };
 
+  aresponses = callPackage ../development/python-modules/aresponses { };
+
   argon2_cffi = callPackage ../development/python-modules/argon2_cffi { };
 
   asana = callPackage ../development/python-modules/asana { };
@@ -6158,6 +6160,8 @@ in {
 
   pyhamcrest = callPackage ../development/python-modules/pyhamcrest { };
 
+  pyhaversion = callPackage ../development/python-modules/pyhaversion { };
+
   parse = callPackage ../development/python-modules/parse { };
 
   parse-type = callPackage ../development/python-modules/parse-type { };