1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pillow 5, zbar 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "python-zbar"; 11 version = "0.23.90"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "mchehab"; 16 repo = "zbar"; 17 rev = version; 18 hash = "sha256-FvV7TMc4JbOiRjWLka0IhtpGGqGm5fis7h870OmJw2U="; 19 }; 20 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 ]; 27 28 propagatedBuildInputs = [ pillow ]; 29 30 buildInputs = [ zbar ]; 31 32 nativeCheckInputs = [ pytestCheckHook ]; 33 34 preBuild = '' 35 cd python 36 ''; 37 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 ]; 46 47 pythonImportsCheck = [ "zbar" ]; 48 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 }; 55}