about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix b/nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix
new file mode 100644
index 000000000000..c282be29c655
--- /dev/null
+++ b/nixpkgs/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 ];
+  };
+}