summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-barcode/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2022-04-24 14:28:09 +0200
committerGitHub <noreply@github.com>2022-04-24 14:28:09 +0200
commitccf9257bb29f277b04f2eacfc1204c8c00aecbd9 (patch)
tree2d9229c2edd280e8cab6759b65ed8681e838fa7a /pkgs/development/python-modules/python-barcode/default.nix
parent8fa007242cf4491d853daad3b7df1bdb57b1d541 (diff)
parent0d8c3cf64b0fd724c335f5fc5e3976447452152d (diff)
Merge branch 'master' into bump-jira
Diffstat (limited to 'pkgs/development/python-modules/python-barcode/default.nix')
-rw-r--r--pkgs/development/python-modules/python-barcode/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-barcode/default.nix b/pkgs/development/python-modules/python-barcode/default.nix
new file mode 100644
index 000000000000..7a586c2caed2
--- /dev/null
+++ b/pkgs/development/python-modules/python-barcode/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, setuptools-scm
+, imagesSupport ? false
+, pillow
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "python-barcode";
+ version = "0.13.1";
+ format = "setuptools";
+
+ disabled = pythonOlder "3.6";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-+vukqiTp2Wl3e+UhwpT/GPbCs2rWO1/C8hCNly4jslI=";
+ };
+
+ propagatedBuildInputs = [
+ setuptools-scm
+ ] ++ lib.optionals (imagesSupport) [
+ pillow
+ ];
+
+ postPatch = ''
+ substituteInPlace setup.cfg \
+ --replace "--cov=barcode" "" \
+ --replace "--cov-report=term-missing:skip-covered" "" \
+ --replace "--no-cov-on-fail" ""
+ '';
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ 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 ];
+ };
+}