about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/zm-py/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/zm-py/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/zm-py/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/zm-py/default.nix b/nixpkgs/pkgs/development/python-modules/zm-py/default.nix
new file mode 100644
index 000000000000..65f5ec1fa7af
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/zm-py/default.nix
@@ -0,0 +1,29 @@
+{ lib, fetchPypi, buildPythonPackage, isPy3k
+, pytest, requests }:
+
+buildPythonPackage rec {
+  pname = "zm-py";
+  version = "0.5.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "b391cca0e52f2a887aa7a46c314b73335b7e3341c428b425fcf314983e5ebb36";
+  };
+
+  disabled = !isPy3k;
+
+  propagatedBuildInputs = [ requests ];
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    PYTHONPATH="./zoneminder:$PYTHONPATH" pytest
+  '';
+
+  meta = with lib; {
+    description = "A loose python wrapper around the ZoneMinder REST API";
+    homepage = "https://github.com/rohankapoorcom/zm-py";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}