1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cython, 6 djvulibre, 7 setuptools, 8 ghostscript_headless, 9 pkg-config, 10 unittestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "python-djvulibre"; 15 version = "0.9.3"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "FriedrichFroebel"; 20 repo = "python-djvulibre"; 21 tag = version; 22 hash = "sha256-ntDRntNxVchZm+i+qBbiZlfHAXJRKMin9Hi+BoJQjTM="; 23 }; 24 25 build-system = [ 26 cython 27 djvulibre 28 ghostscript_headless 29 pkg-config 30 setuptools 31 ]; 32 33 dependencies = [ 34 djvulibre 35 ghostscript_headless 36 ]; 37 38 preCheck = '' 39 rm -rf djvu 40 rm -rf tests/examples 41 ''; 42 43 nativeCheckInputs = [ unittestCheckHook ]; 44 45 unittestFlagsArray = [ 46 "tests" 47 "-v" 48 ]; 49 50 meta = with lib; { 51 description = "Python support for the DjVu image format"; 52 homepage = "https://github.com/FriedrichFroebel/python-djvulibre"; 53 license = licenses.gpl2Only; 54 changelog = "https://github.com/FriedrichFroebel/python-djvulibre/releases/tag/${src.tag}"; 55 maintainers = with maintainers; [ dansbandit ]; 56 }; 57}