nixpkgs/pkgs/development/python-modules/xhtml2pdf/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

67 lines
1.2 KiB
Nix

{
lib,
arabic-reshaper,
buildPythonPackage,
fetchFromGitHub,
html5lib,
pillow,
pyhanko,
pyhanko-certvalidator,
pypdf,
pytestCheckHook,
python-bidi,
reportlab,
setuptools,
svglib,
}:
buildPythonPackage rec {
pname = "xhtml2pdf";
version = "0.2.17";
pyproject = true;
src = fetchFromGitHub {
owner = "xhtml2pdf";
repo = "xhtml2pdf";
tag = "v${version}";
hash = "sha256-qp0JVp5efIrI98YT0rwFAMSEW+0aIhedfYGND4V7Mto=";
};
build-system = [
setuptools
];
dependencies = [
arabic-reshaper
html5lib
pillow
pyhanko
pyhanko-certvalidator
pypdf
python-bidi
reportlab
svglib
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Tests requires network access
"test_document_cannot_identify_image"
"test_document_with_broken_image"
];
pythonImportsCheck = [
"xhtml2pdf"
"xhtml2pdf.pisa"
];
meta = {
changelog = "https://github.com/xhtml2pdf/xhtml2pdf/releases/tag/${src.tag}";
description = "PDF generator using HTML and CSS";
homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
license = lib.licenses.asl20;
mainProgram = "xhtml2pdf";
maintainers = [ ];
};
}