summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/hyperion-py/default.nix52
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/hyperion-py/default.nix b/pkgs/development/python-modules/hyperion-py/default.nix
new file mode 100644
index 00000000000..c282be29c65
--- /dev/null
+++ b/pkgs/development/python-modules/hyperion-py/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, aiohttp
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+, poetry-core
+, pytest-aiohttp
+, pytest-asyncio
+}:
+
+buildPythonPackage rec {
+  pname = "hyperion-py";
+  version = "0.7.4";
+  disabled = pythonOlder "3.8";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "dermotduffy";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "00x12ppmvlxs3qbdxq06wnzakvwm2m39qhmpp27qfpl137b0qqyj";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+  ];
+
+  checkInputs = [
+    pytest-asyncio
+    pytest-aiohttp
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace " --timeout=9 --cov=hyperion" ""
+  '';
+
+  pythonImportsCheck = [ "hyperion" ];
+
+  meta = with lib; {
+    description = "Python package for Hyperion Ambient Lighting";
+    homepage = "https://github.com/dermotduffy/hyperion-py";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 01219719acc..8448cc56070 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3245,6 +3245,8 @@ in {
 
   hyperframe = callPackage ../development/python-modules/hyperframe { };
 
+  hyperion-py = callPackage ../development/python-modules/hyperion-py { };
+
   hyperkitty = callPackage ../servers/mail/mailman/hyperkitty.nix { };
 
   hyperlink = callPackage ../development/python-modules/hyperlink { };