2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
flit-core,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
filetype,
|
|
|
|
defusedxml,
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
pillow-heif,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
numpy,
|
|
|
|
opencv4,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
|
|
|
wand,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "willow";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.8.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "pyproject";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wagtail";
|
|
|
|
repo = "Willow";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-g9/v56mdo0sJe5Pl/to/R/kXayaKK3qaYbnnPXpFjXE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
pythonRelaxDeps = [ "defusedxml" ];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
filetype
|
|
|
|
defusedxml
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
heif = [ pillow-heif ];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
numpy
|
|
|
|
opencv4
|
|
|
|
pytestCheckHook
|
|
|
|
pillow
|
|
|
|
wand
|
|
|
|
] ++ passthru.optional-dependencies.heif;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python image library that sits on top of Pillow, Wand and OpenCV";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/torchbox/Willow/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ desiderius ];
|
|
|
|
};
|
|
|
|
}
|