about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyvera
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-01-13 23:40:45 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-01-13 23:40:45 +0100
commitf215ae9dab9d5e44da5b3dd185c75bea895713b6 (patch)
treea09fbf3682e645b0e4e6edc8daff3f4a1c9667fd /pkgs/development/python-modules/pyvera
parentb451286b1f56a65ad37fb606b7a77e73b10911e5 (diff)
downloadnixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar.gz
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar.bz2
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar.lz
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar.xz
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.tar.zst
nixlib-f215ae9dab9d5e44da5b3dd185c75bea895713b6.zip
python3Packages.pyvera: init at 0.3.11
Diffstat (limited to 'pkgs/development/python-modules/pyvera')
-rw-r--r--pkgs/development/python-modules/pyvera/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyvera/default.nix b/pkgs/development/python-modules/pyvera/default.nix
new file mode 100644
index 000000000000..4415ca7c376d
--- /dev/null
+++ b/pkgs/development/python-modules/pyvera/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, poetry-core
+, pytest-cov
+, pytest-asyncio
+, pytest-timeout
+, responses
+, pytestCheckHook
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "pyvera";
+  version = "0.3.11";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "pavoni";
+    repo = pname;
+    rev = version;
+    sha256 = "0yi2cjd3jag95xa0k24f7d7agi26ywb3219a0j0k8l2nsx2sdi87";
+  };
+
+  patches = [
+    (fetchpatch {
+      # build-system section is missing https://github.com/pavoni/pyvera/pull/142
+      url = "https://github.com/pavoni/pyvera/pull/142/commits/e90995a8d55107118d324e8cf189ddf1d9e3aa6c.patch";
+      sha256 = "1psq3fiwg20kcwyybzh5g17dzn5fh29lhm238npyg846innbzgs7";
+    })
+  ];
+
+  nativeBuildInputs = [ poetry-core ];
+
+  propagatedBuildInputs = [ requests ];
+
+  checkInputs = [
+    pytest-asyncio
+    pytest-timeout
+    pytest-cov
+    pytestCheckHook
+    responses
+  ];
+
+  pythonImportsCheck = [ "pyvera" ];
+
+  meta = with lib; {
+    description = "Python library to control devices via the Vera hub";
+    homepage = "https://github.com/pavoni/pyvera";
+    license = with licenses; [ gpl2Only ];
+    maintainers = with maintainers; [ fab ];
+  };
+}