about summary refs log tree commit diff
path: root/pkgs/development/python-modules/airtouch5py/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/airtouch5py/default.nix')
-rw-r--r--pkgs/development/python-modules/airtouch5py/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/airtouch5py/default.nix b/pkgs/development/python-modules/airtouch5py/default.nix
new file mode 100644
index 0000000000000..f474e23457863
--- /dev/null
+++ b/pkgs/development/python-modules/airtouch5py/default.nix
@@ -0,0 +1,53 @@
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+
+  # build-system
+  poetry-core,
+  pythonRelaxDepsHook,
+
+  # dependencies
+  bitarray,
+  crc,
+
+  # tests
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "airtouch5py";
+  version = "0.2.8";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchFromGitHub {
+    owner = "danzel";
+    repo = "airtouch5py";
+    rev = "refs/tags/${version}";
+    hash = "sha256-MpwppyAWDiA3CZXCIUQ/vidzcxKXZJSlrFRhmrPMgCE=";
+  };
+
+  build-system = [ poetry-core ];
+  nativeBuildInputs = [ pythonRelaxDepsHook ];
+  pythonRelaxDeps = [ "crc" ];
+
+  dependencies = [
+    bitarray
+    crc
+  ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  pythonImportsCheck = [ "airtouch5py" ];
+
+  meta = with lib; {
+    changelog = "https://github.com/danzel/airtouch5py/releases/tag/${version}";
+    description = "Python client for the airtouch 5";
+    homepage = "https://github.com/danzel/airtouch5py";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jamiemagee ];
+  };
+}