python3Packages.pillow-heif: init at 0.13.0

This commit is contained in:
Daniel Olsen 2023-09-25 02:39:08 +02:00 committed by Yt
parent 350b6b84e6
commit 0f24b2409c
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, cmake
, pillow
, pytest
, nasm
, libheif
, libaom
, libde265
, x265
}:
buildPythonPackage rec {
pname = "pillow_heif";
version = "0.13.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "bigcat88";
repo = "pillow_heif";
rev = "refs/tags/v${version}";
hash = "sha256-GbOW29rGpLMS7AfShuO6UCzcspdHtFS7hyNKori0otI=";
};
nativeBuildInputs = [ cmake nasm ];
buildInputs = [ libheif libaom libde265 x265 ];
propagatedBuildInputs = [ pillow ];
nativeCheckInputs = [ pytest ];
dontUseCmakeConfigure = true;
pythonImportsCheck = [ "pillow_heif" ];
meta = {
description = "Python library for working with HEIF images and plugin for Pillow";
homepage = "https://github.com/bigcat88/pillow_heif";
license = with lib.licenses; [ bsd3 lgpl3 ];
maintainers = with lib.maintainers; [ dandellion ];
};
}

View file

@ -8190,6 +8190,8 @@ self: super: with self; {
inherit (pkgs.xorg) libX11 libxcb;
};
pillow-heif = callPackage ../development/python-modules/pillow-heif { };
pillow-simd = callPackage ../development/python-modules/pillow-simd {
inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk;
inherit (pkgs.xorg) libX11;