diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-15 19:32:38 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-15 19:32:38 +0100 |
commit | 6b8e2555ef013b579cda57025b17d662e0f1fe1f (patch) | |
tree | 5a83c673af26c9976acd5a5dfa20e09e06898047 /nixpkgs/pkgs/development/python-modules/fpdf2/default.nix | |
parent | 66ca7a150b5c051f0728f13134e6265cc46f370c (diff) | |
parent | 02357adddd0889782362d999628de9d309d202dc (diff) | |
download | nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.gz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.bz2 nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.lz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.xz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.zst nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fpdf2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/fpdf2/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fpdf2/default.nix b/nixpkgs/pkgs/development/python-modules/fpdf2/default.nix new file mode 100644 index 000000000000..dd24dc35972e --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fpdf2/default.nix @@ -0,0 +1,67 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +, setuptools + +, defusedxml +, pillow +, fonttools + +, pytestCheckHook +, qrcode +, camelot +, uharfbuzz +}: + +buildPythonPackage rec { + pname = "fpdf2"; + version = "2.7.6"; + pyproject = true; + + src = fetchFromGitHub { + owner = "py-pdf"; + repo = "fpdf2"; + rev = version; + hash = "sha256-wiCKmS+GlrYV2/6TEdXUbmWIMWU4hyzswFJZR9EOWxc="; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=fpdf --cov-report=xml" "" + ''; + + nativeBuildInputs = [ setuptools ]; + + propagatedBuildInputs = [ + defusedxml + pillow + fonttools + ]; + + nativeCheckInputs = [ + pytestCheckHook + qrcode + camelot + uharfbuzz + ]; + + disabledTestPaths = [ + "test/table/test_table_extraction.py" # tabula-py not packaged yet + "test/signing/test_sign.py" # endesive not packaged yet + ]; + + disabledTests = [ + "test_png_url" # tries to download file + "test_page_background" # tries to download file + "test_share_images_cache" # uses timing functions + ]; + + meta = { + homepage = "https://github.com/py-pdf/fpdf2"; + description = "Simple PDF generation for Python"; + changelog = "https://github.com/py-pdf/fpdf2/blob/${version}/CHANGELOG.md"; + license = lib.licenses.lgpl3Only; + maintainers = with lib.maintainers; [ jfvillablanca ]; + }; +} |