gif-for-cli: support pillow 10

This commit is contained in:
Theodore Ni 2023-08-05 13:42:16 -07:00
parent 04f88809c1
commit b0c6a738b8
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474

View file

@ -1,19 +1,49 @@
{ lib, fetchFromGitHub, python3Packages, ffmpeg, zlib, libjpeg }:
{ lib
, fetchFromGitHub
, fetchpatch
, python3Packages
, ffmpeg
, zlib
, libjpeg
}:
python3Packages.buildPythonApplication {
pname = "gif-for-cli";
version = "1.1.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "google";
repo = "gif-for-cli";
rev = "31f8aa2d617d6d6e941154f60e287c38dd9a74d5";
sha256 = "Bl5o492BUAn1KsscnlMIXCzJuy7xWUsdnxIKZKaRM3M=";
hash = "sha256-Bl5o492BUAn1KsscnlMIXCzJuy7xWUsdnxIKZKaRM3M=";
};
nativeCheckInputs = [ python3Packages.coverage ];
buildInputs = [ zlib libjpeg ];
propagatedBuildInputs = with python3Packages; [ ffmpeg pillow requests x256 ];
patches = [
# https://github.com/google/gif-for-cli/pull/36
(fetchpatch {
name = "pillow-10-compatibility.patch";
url = "https://github.com/google/gif-for-cli/commit/49b13ec981e197cbc10f920b7b25a97c4cc6a61c.patch";
hash = "sha256-B8wfkdhSUY++St6DzgaJ1xF1mZKvi8oxLXbo63yemDM=";
})
];
# coverage is not needed to build and test this package
postPatch = ''
sed -i '/coverage>=/d' setup.py
'';
buildInputs = [
zlib
libjpeg
];
propagatedBuildInputs = with python3Packages; [
ffmpeg
pillow
requests
x256
];
meta = with lib; {
description = "Render gifs as ASCII art in your cli";
@ -22,5 +52,4 @@ python3Packages.buildPythonApplication {
license = licenses.asl20;
maintainers = with maintainers; [ Scriptkiddi ];
};
}