mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
0215034f25
when they already rely on SRI hashes.
52 lines
1.0 KiB
Nix
52 lines
1.0 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;
|
|
hash = "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" ""
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
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 ];
|
|
};
|
|
}
|