Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / willow / default.nix
blob1787faa38905afcd0a51f956b9c9e525793ab336
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
6 # build-system
7 , flit-core
9 # dependencies
10 , filetype
11 , defusedxml
13 # optional-dependencies
14 , pillow-heif
16 # tests
17 , numpy
18 , opencv4
19 , pillow
20 , pytestCheckHook
21 , wand
24 buildPythonPackage rec {
25   pname = "willow";
26   version = "1.6.2";
27   format = "pyproject";
29   disabled = pythonOlder "2.7";
31   src = fetchFromGitHub {
32     owner = "wagtail";
33     repo = "Willow";
34     rev = "refs/tags/v${version}";
35     hash = "sha256-dW2FVN3/mBAhVQ094uBsnXzdyTRKgHUDx0SWLm3g374=";
36   };
38   nativeBuildInputs = [
39     flit-core
40   ];
42   propagatedBuildInputs = [
43     filetype
44     defusedxml
45   ];
47   passthru.optional-dependencies = {
48     heif = [
49       pillow-heif
50     ];
51   };
53   nativeCheckInputs = [
54     numpy
55     opencv4
56     pytestCheckHook
57     pillow
58     wand
59   ] ++ passthru.optional-dependencies.heif;
61   meta = with lib; {
62     description = "A Python image library that sits on top of Pillow, Wand and OpenCV";
63     homepage = "https://github.com/torchbox/Willow/";
64     license = licenses.bsd2;
65     maintainers = with maintainers; [ desiderius ];
66   };