depot/third_party/nixpkgs/pkgs/by-name/pr/pretix/plugins/zugferd.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

53 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
django,
drafthorse,
ghostscript_headless,
}:
buildPythonPackage rec {
pname = "pretix-zugferd";
version = "2.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-zugferd";
rev = "v${version}";
hash = "sha256-AJbrx1n32YAZnJGYX67qqaEnOeegYfSUEekvQnmjt+0=";
};
postPatch = ''
substituteInPlace pretix_zugferd/invoice.py \
--replace-fail 'fallback="gs"' 'fallback="${lib.getExe ghostscript_headless}"'
'';
pythonRelaxDeps = [ "drafthorse" ];
build-system = [
django
pretix-plugin-build
setuptools
];
postBuild = ''
make
'';
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 ];
};
}