nixpkgs/pkgs/development/python-modules/pillow-heif/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
# build-system
, cmake
, nasm
# native dependencies
, libheif
, libaom
, libde265
, x265
# dependencies
, pillow
# tests
, opencv4
, numpy
, pympler
, pytestCheckHook
}:
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
];
dontUseCmakeConfigure = true;
buildInputs = [
libaom
libde265
libheif
x265
];
propagatedBuildInputs = [
pillow
];
pythonImportsCheck = [
"pillow_heif"
];
nativeCheckInputs = [
opencv4
numpy
pympler
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
# https://github.com/bigcat88/pillow_heif/issues/89
# not reproducible in nixpkgs
"test_opencv_crash"
];
meta = {
changelog = "https://github.com/bigcat88/pillow_heif/releases/tag/v${version}";
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 ];
};
}