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