11 buildPythonPackage rec {
15 src = fetchFromGitHub {
16 owner = "NaturalHistoryMuseum";
19 sha256 = "8IZQY6qB4r1SUPItDlTDnVQuPs0I38K3yJ6LiPJuwbU=";
22 propagatedBuildInputs = [ zbar pillow numpy ];
24 nativeCheckInputs = [ pytestCheckHook ];
26 # find_library doesn't return an absolute path
27 # https://github.com/NixOS/nixpkgs/issues/7307
29 substituteInPlace pyzbar/zbar_library.py \
31 "find_library('zbar')" \
32 '"${lib.getLib zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"'
36 # find_library has been replaced by a hardcoded path
37 # the test fails due to find_library not called
38 "test_found_non_windows"
39 "test_not_found_non_windows"
42 pythonImportsCheck = [ "pyzbar" ];
45 description = "Read one-dimensional barcodes and QR codes from Python using the zbar library.";
46 homepage = "https://github.com/NaturalHistoryMuseum/pyzbar";
47 license = licenses.mit;
48 maintainers = with maintainers; [ gador ];