at 25.11-pre 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 defusedxml, 5 fetchFromGitHub, 6 filetype, 7 flit-core, 8 numpy, 9 opencv4, 10 pillow-heif, 11 pillow, 12 pytestCheckHook, 13 pythonOlder, 14 wand, 15}: 16 17buildPythonPackage rec { 18 pname = "willow"; 19 version = "1.9.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "wagtail"; 26 repo = "Willow"; 27 tag = "v${version}"; 28 hash = "sha256-H/UXE6gA6x849aqBcUgl3JYZ87OMNpuFyWGSsgqW1Rk="; 29 }; 30 31 build-system = [ flit-core ]; 32 33 pythonRelaxDeps = [ "defusedxml" ]; 34 35 dependencies = [ 36 filetype 37 defusedxml 38 ]; 39 40 optional-dependencies = { 41 heif = [ pillow-heif ]; 42 }; 43 44 nativeCheckInputs = [ 45 numpy 46 opencv4 47 pytestCheckHook 48 pillow 49 wand 50 ] ++ optional-dependencies.heif; 51 52 disabledTests = [ 53 # ValueError: Invalid quality setting 54 "test_save_avif_lossless" 55 ]; 56 57 meta = with lib; { 58 description = "Python image library that sits on top of Pillow, Wand and OpenCV"; 59 homepage = "https://github.com/torchbox/Willow/"; 60 changelog = "https://github.com/wagtail/Willow/releases/tag/v${version}"; 61 license = licenses.bsd2; 62 maintainers = with maintainers; [ desiderius ]; 63 }; 64}