summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-barcode
diff options
context:
space:
mode:
authorstuebinm <stuebinm@in.tum.de>2022-04-24 18:43:28 +0200
committerGitHub <noreply@github.com>2022-04-24 18:43:28 +0200
commit92fe62e1de5b587ee05d81400d8701558065f814 (patch)
tree2f978329eab91f04aa857a835baed4e412d7c4e4 /pkgs/development/python-modules/python-barcode
parent1c9c4a8e807703e0414c01a1a05b45cef974e177 (diff)
parenta3c605936a1d4ac47c61c875cf63b3d9e0b4415d (diff)
Merge branch 'master' into nextcloud-secrets
Diffstat (limited to 'pkgs/development/python-modules/python-barcode')
-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 ];
+ };
+}