about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-zbar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-zbar/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-zbar/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-zbar/default.nix b/nixpkgs/pkgs/development/python-modules/python-zbar/default.nix
new file mode 100644
index 000000000000..04e89b664c49
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/python-zbar/default.nix
@@ -0,0 +1,42 @@
+{ lib , buildPythonPackage , fetchFromGitHub , pillow , zbar , pytestCheckHook }:
+
+buildPythonPackage rec {
+  pname = "python-zbar";
+  version = "0.23.90";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "mchehab";
+    repo = "zbar";
+    rev = version;
+    sha256 = "sha256-FvV7TMc4JbOiRjWLka0IhtpGGqGm5fis7h870OmJw2U=";
+  };
+
+  propagatedBuildInputs = [ pillow ];
+
+  buildInputs = [ zbar ];
+
+  checkInputs = [ pytestCheckHook ];
+
+  preBuild = ''
+    cd python
+  '';
+
+  disabledTests = [
+    #AssertionError: b'Y800' != 'Y800'
+    "test_format"
+    "test_new"
+    #Requires loading a recording device
+    #zbar.SystemError: <zbar.Processor object at 0x7ffff615a680>
+    "test_processing"
+  ];
+
+  pythonImportsCheck = [ "zbar" ];
+
+  meta = with lib; {
+    description = "Python bindings for zbar";
+    homepage = "https://github.com/mchehab/zbar";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ wolfangaukang ];
+  };
+}