pretix.plugins.zugferd: init at 2.2.0

Annotate pretix' invoices with ZUGFeRD data
This commit is contained in:
Martin Weinelt
2024-08-01 05:22:38 +02:00
parent 53e5eaef01
commit 83d3dd1c4a
2 changed files with 49 additions and 0 deletions
@@ -10,4 +10,6 @@
reluctant-stripe = callPackage ./reluctant-stripe.nix { };
stretchgoals = callPackage ./stretchgoals.nix { };
zugferd = callPackage ./zugferd.nix { };
}
@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
drafthorse,
ghostscript_headless,
}:
buildPythonPackage rec {
pname = "pretix-zugferd";
version = "2.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-zugferd";
rev = "v${version}";
hash = "sha256-ozFDNIA+0feHrHHvxcf+6Jh4L83svmPEE/rerd4Yim8=";
};
postPatch = ''
substituteInPlace pretix_zugferd/invoice.py \
--replace-fail 'fallback="gs"' 'fallback="${lib.getExe ghostscript_headless}"'
'';
pythonRelaxDeps = [ "drafthorse" ];
build-system = [
pretix-plugin-build
setuptools
];
dependencies = [ drafthorse ];
doCheck = false; # no tests
pythonImportsCheck = [ "pretix_zugferd" ];
meta = with lib; {
description = "Annotate pretix' invoices with ZUGFeRD data";
homepage = "https://github.com/pretix/pretix-zugferd";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}