at master 1.1 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.11.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-7aVLPSspwQRWQ+aNYbKkOBzwc7uoVzQvAG8vezp8QZY="; 29 }; 30 31 build-system = [ flit-core ]; 32 33 dependencies = [ 34 filetype 35 defusedxml 36 ]; 37 38 optional-dependencies = { 39 heif = [ pillow-heif ]; 40 }; 41 42 nativeCheckInputs = [ 43 numpy 44 opencv4 45 pytestCheckHook 46 pillow 47 wand 48 ] 49 ++ optional-dependencies.heif; 50 51 meta = { 52 description = "Python image library that sits on top of Pillow, Wand and OpenCV"; 53 homepage = "https://github.com/torchbox/Willow/"; 54 changelog = "https://github.com/wagtail/Willow/releases/tag/v${version}"; 55 license = lib.licenses.bsd2; 56 maintainers = with lib.maintainers; [ 57 kuflierl 58 ]; 59 }; 60}