Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-zbar / default.nix
blob4d85b26875cd7db0dcd80583f7f6d1c4b9524e84
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pillow
5 , zbar
6 , pytestCheckHook
7 }:
9 buildPythonPackage rec {
10   pname = "python-zbar";
11   version = "0.23.90";
12   format = "setuptools";
14   src = fetchFromGitHub {
15     owner = "mchehab";
16     repo = "zbar";
17     rev = version;
18     hash = "sha256-FvV7TMc4JbOiRjWLka0IhtpGGqGm5fis7h870OmJw2U=";
19   };
21   patches = [
22     # python: enum: fix build for Python 3.11
23     # https://github.com/mchehab/zbar/pull/231
24     # the patch is reworked as it does not cleanly apply
25     ./0001-python-enum-fix-build-for-Python-3.11.patch
26   ];
28   propagatedBuildInputs = [ pillow ];
30   buildInputs = [ zbar ];
32   nativeCheckInputs = [ pytestCheckHook ];
34   preBuild = ''
35     cd python
36   '';
38   disabledTests = [
39     #AssertionError: b'Y800' != 'Y800'
40     "test_format"
41     "test_new"
42     #Requires loading a recording device
43     #zbar.SystemError: <zbar.Processor object at 0x7ffff615a680>
44     "test_processing"
45   ];
47   pythonImportsCheck = [ "zbar" ];
49   meta = with lib; {
50     description = "Python bindings for zbar";
51     homepage = "https://github.com/mchehab/zbar";
52     license = licenses.lgpl21Only;
53     maintainers = with maintainers; [ wolfangaukang ];
54   };