Merge pull request #310062 from cyberus-technology/paperless-asn-qr-codes

paperless-asn-qr-codes: init at 0.2.0

Changed files
+93
pkgs
by-name
pa
paperless-asn-qr-codes
development
python-modules
reportlab-qrcode
top-level
+42
pkgs/by-name/pa/paperless-asn-qr-codes/package.nix
···
···
+
{ lib
+
, python3
+
, fetchFromGitHub
+
}:
+
+
python3.pkgs.buildPythonApplication rec {
+
pname = "paperless-asn-qr-codes";
+
version = "0.2.0";
+
pyproject = true;
+
+
src = fetchFromGitHub {
+
owner = "entropia";
+
repo = "paperless-asn-qr-codes";
+
rev = "v${version}";
+
hash = "sha256-/xCU6xDrmhkua4Iw/BCzhOuqO5GT/0rTJ+Y59wuMz6E=";
+
};
+
+
prePatch = ''
+
substituteInPlace pyproject.toml \
+
--replace-fail "\"argparse\"," ""
+
'';
+
+
nativeBuildInputs = [
+
python3.pkgs.hatch-vcs
+
python3.pkgs.hatchling
+
];
+
+
propagatedBuildInputs = with python3.pkgs; [
+
reportlab
+
reportlab-qrcode
+
];
+
+
pythonImportsCheck = [ "paperless_asn_qr_codes" ];
+
+
meta = with lib; {
+
description = "Command line utility for generating ASN labels for paperless with both a human-readable representation, as well as a QR code for machine consumption";
+
homepage = "https://github.com/entropia/paperless-asn-qr-codes";
+
license = licenses.gpl3Only;
+
maintainers = with maintainers; [ xanderio ];
+
mainProgram = "paperless-asn-qr-codes";
+
};
+
}
+49
pkgs/development/python-modules/reportlab-qrcode/default.nix
···
···
+
{ lib
+
, buildPythonPackage
+
, fetchPypi
+
, setuptools
+
, wheel
+
, qrcode
+
, reportlab
+
, pillow
+
, pytest
+
, pyzbar
+
}:
+
+
buildPythonPackage rec {
+
pname = "reportlab-qrcode";
+
version = "0.1.6";
+
pyproject = true;
+
+
src = fetchPypi {
+
inherit pname version;
+
hash = "sha256-m/oeuA797MEBOJBIG157VIa7TbEbRRVK/O8Arz/oO/o=";
+
};
+
+
nativeBuildInputs = [
+
setuptools
+
wheel
+
];
+
+
propagatedBuildInputs = [
+
qrcode
+
reportlab
+
];
+
+
passthru.optional-dependencies = {
+
testing = [
+
pillow
+
pytest
+
pyzbar
+
];
+
};
+
+
pythonImportsCheck = [ "reportlab_qrcode" ];
+
+
meta = with lib; {
+
description = "Allows to create QR codes for use with the ReportLab PDF library";
+
homepage = "https://pypi.org/project/reportlab-qrcode/";
+
license = licenses.mit;
+
maintainers = with maintainers; [ xanderio ];
+
};
+
}
+2
pkgs/top-level/python-packages.nix
···
reportlab = callPackage ../development/python-modules/reportlab { };
repoze-lru = callPackage ../development/python-modules/repoze-lru { };
repoze-sphinx-autointerface = callPackage ../development/python-modules/repoze-sphinx-autointerface { };
···
reportlab = callPackage ../development/python-modules/reportlab { };
+
reportlab-qrcode = callPackage ../development/python-modules/reportlab-qrcode { };
+
repoze-lru = callPackage ../development/python-modules/repoze-lru { };
repoze-sphinx-autointerface = callPackage ../development/python-modules/repoze-sphinx-autointerface { };