1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, setuptools-scm 6, pillow 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "python-barcode"; 12 version = "0.15.1"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-Oxgl+9sR5ZdGbf9ChrTqmx6GpXcXtZ5WOuZ5cm/IVN4="; 20 }; 21 22 propagatedBuildInputs = [ 23 setuptools-scm 24 ]; 25 26 passthru.optional-dependencies = { 27 images = [ 28 pillow 29 ]; 30 }; 31 32 postPatch = '' 33 substituteInPlace setup.cfg \ 34 --replace "--cov=barcode" "" \ 35 --replace "--cov-report=term-missing:skip-covered" "" \ 36 --replace "--no-cov-on-fail" "" 37 ''; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 ] ++ passthru.optional-dependencies.images; 42 43 pythonImportsCheck = [ "barcode" ]; 44 45 meta = with lib; { 46 description = "Create standard barcodes with Python"; 47 homepage = "https://github.com/WhyNotHugo/python-barcode"; 48 changelog = "https://github.com/WhyNotHugo/python-barcode/blob/v${version}/docs/changelog.rst"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ wolfangaukang ]; 51 }; 52}