diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/img2pdf/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/img2pdf/default.nix | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix b/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix index 0450dee30b46..06183b3d5348 100644 --- a/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix +++ b/nixpkgs/pkgs/development/python-modules/img2pdf/default.nix @@ -1,8 +1,11 @@ { lib , buildPythonPackage , isPy27 -, fetchPypi +, fetchFromGitea +, substituteAll , fetchpatch +, colord +, setuptools , pikepdf , pillow , stdenv @@ -19,20 +22,34 @@ buildPythonPackage rec { pname = "img2pdf"; - version = "0.4.4"; + version = "0.5.0"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c"; + pyproject = true; + + src = fetchFromGitea { + domain = "gitlab.mister-muffin.de"; + owner = "josch"; + repo = "img2pdf"; + rev = version; + hash = "sha256-k0GqBTS8PvYDmjzyLCSdQB7oBakrEQYJcQykDNrzgcA="; }; patches = [ + (substituteAll { + src = ./default-icc-profile.patch; + inherit colord; + }) (fetchpatch { - # https://gitlab.mister-muffin.de/josch/img2pdf/issues/148 - url = "https://gitlab.mister-muffin.de/josch/img2pdf/commit/57d7e07e6badb252c12015388b58fcb5285d3158.patch"; - hash = "sha256-H/g55spe/oVJRxO2Vh+F+ZgR6aLoRUrNeu5WnuU7k/k="; + # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178 + url = "https://salsa.debian.org/debian/img2pdf/-/raw/4a7dbda0f473f7c5ffcaaf68ea4ad3f435e0920d/debian/patches/fix_tests.patch"; + hash = "sha256-A1zK6yINhS+dvyckZjqoSO1XJRTaf4OXFdq5ufUrBs8="; }) + + ]; + + nativeBuildInputs = [ + setuptools ]; propagatedBuildInputs = [ @@ -40,9 +57,6 @@ buildPythonPackage rec { pillow ]; - # https://gitlab.mister-muffin.de/josch/img2pdf/issues/128 - doCheck = !stdenv.isAarch64; - nativeCheckInputs = [ exiftool ghostscript @@ -60,16 +74,18 @@ buildPythonPackage rec { ''; disabledTests = [ - "test_tiff_rgb" - "test_png_gray1" # https://gitlab.mister-muffin.de/josch/img2pdf/issues/154 + # https://gitlab.mister-muffin.de/josch/img2pdf/issues/178 + "test_miff_cmyk16" ]; pythonImportsCheck = [ "img2pdf" ]; meta = with lib; { + changelog = "https://gitlab.mister-muffin.de/josch/img2pdf/src/tag/${src.rev}/CHANGES.rst"; description = "Convert images to PDF via direct JPEG inclusion"; homepage = "https://gitlab.mister-muffin.de/josch/img2pdf"; - license = licenses.lgpl2; + license = licenses.lgpl3Plus; + mainProgram = "img2pdf"; maintainers = with maintainers; [ veprbl dotlambda ]; }; } |