Merge pull request #247393 from tjni/gif-for-cli

gif-for-cli: support pillow 10

authored by

Mario Rodas and committed by
GitHub
4ca81ad6 dd48ee46

+35 -6
+35 -6
pkgs/tools/misc/gif-for-cli/default.nix
··· 1 - { lib, fetchFromGitHub, python3Packages, ffmpeg, zlib, libjpeg }: 1 + { lib 2 + , fetchFromGitHub 3 + , fetchpatch 4 + , python3Packages 5 + , ffmpeg 6 + , zlib 7 + , libjpeg 8 + }: 2 9 3 10 python3Packages.buildPythonApplication { 4 11 pname = "gif-for-cli"; 5 12 version = "1.1.2"; 13 + format = "setuptools"; 6 14 7 15 src = fetchFromGitHub { 8 16 owner = "google"; 9 17 repo = "gif-for-cli"; 10 18 rev = "31f8aa2d617d6d6e941154f60e287c38dd9a74d5"; 11 - sha256 = "Bl5o492BUAn1KsscnlMIXCzJuy7xWUsdnxIKZKaRM3M="; 19 + hash = "sha256-Bl5o492BUAn1KsscnlMIXCzJuy7xWUsdnxIKZKaRM3M="; 12 20 }; 13 21 14 - nativeCheckInputs = [ python3Packages.coverage ]; 15 - buildInputs = [ zlib libjpeg ]; 16 - propagatedBuildInputs = with python3Packages; [ ffmpeg pillow requests x256 ]; 22 + patches = [ 23 + # https://github.com/google/gif-for-cli/pull/36 24 + (fetchpatch { 25 + name = "pillow-10-compatibility.patch"; 26 + url = "https://github.com/google/gif-for-cli/commit/49b13ec981e197cbc10f920b7b25a97c4cc6a61c.patch"; 27 + hash = "sha256-B8wfkdhSUY++St6DzgaJ1xF1mZKvi8oxLXbo63yemDM="; 28 + }) 29 + ]; 30 + 31 + # coverage is not needed to build and test this package 32 + postPatch = '' 33 + sed -i '/coverage>=/d' setup.py 34 + ''; 35 + 36 + buildInputs = [ 37 + zlib 38 + libjpeg 39 + ]; 40 + 41 + propagatedBuildInputs = with python3Packages; [ 42 + ffmpeg 43 + pillow 44 + requests 45 + x256 46 + ]; 17 47 18 48 meta = with lib; { 19 49 description = "Render gifs as ASCII art in your cli"; ··· 22 52 license = licenses.asl20; 23 53 maintainers = with maintainers; [ Scriptkiddi ]; 24 54 }; 25 - 26 55 }