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.14.0"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.6"; 16 17 src = fetchPypi { 18 inherit pname version; 19 sha256 = "sha256-JBs0qlxctqmImIL5QJsBgpA6LF0ZtCGL42Cc271f/fk="; 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 checkInputs = [ 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 license = licenses.mit; 49 maintainers = with maintainers; [ wolfangaukang ]; 50 }; 51}