1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 flit-core,
6 ghostscript,
7 pillow,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "pydyf";
14 version = "0.9.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-1bJE6PwkEZznvV1R6i1nc8D/iKqBWX21VrxEDGuIBhA=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace "--isort --flake8 --cov --no-cov-on-fail" ""
27 '';
28
29 nativeBuildInputs = [ flit-core ];
30
31 nativeCheckInputs = [
32 ghostscript
33 pillow
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [ "pydyf" ];
38
39 meta = with lib; {
40 description = "Low-level PDF generator written in Python and based on PDF specification 1.7";
41 homepage = "https://doc.courtbouillon.org/pydyf/stable/";
42 changelog = "https://github.com/CourtBouillon/pydyf/releases/tag/v${version}";
43 license = licenses.bsd3;
44 maintainers = with maintainers; [ rprecenth ];
45 };
46}