depot/third_party/nixpkgs/pkgs/development/python-modules/python-barcode/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

51 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools-scm
, pillow
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "python-barcode";
version = "0.14.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-JBs0qlxctqmImIL5QJsBgpA6LF0ZtCGL42Cc271f/fk=";
};
propagatedBuildInputs = [
setuptools-scm
];
passthru.optional-dependencies = {
images = [
pillow
];
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=barcode" "" \
--replace "--cov-report=term-missing:skip-covered" "" \
--replace "--no-cov-on-fail" ""
'';
checkInputs = [
pytestCheckHook
] ++ passthru.optional-dependencies.images;
pythonImportsCheck = [ "barcode" ];
meta = with lib; {
description = "Create standard barcodes with Python";
homepage = "https://github.com/WhyNotHugo/python-barcode";
license = licenses.mit;
maintainers = with maintainers; [ wolfangaukang ];
};
}