at 24.11-pre 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 flit-core, 8 9 # dependencies 10 filetype, 11 defusedxml, 12 13 # optional-dependencies 14 pillow-heif, 15 16 # tests 17 numpy, 18 opencv4, 19 pillow, 20 pytestCheckHook, 21 wand, 22}: 23 24buildPythonPackage rec { 25 pname = "willow"; 26 version = "1.8.0"; 27 format = "pyproject"; 28 29 src = fetchFromGitHub { 30 owner = "wagtail"; 31 repo = "Willow"; 32 rev = "refs/tags/v${version}"; 33 hash = "sha256-g9/v56mdo0sJe5Pl/to/R/kXayaKK3qaYbnnPXpFjXE="; 34 }; 35 36 nativeBuildInputs = [ flit-core ]; 37 38 propagatedBuildInputs = [ 39 filetype 40 defusedxml 41 ]; 42 43 passthru.optional-dependencies = { 44 heif = [ pillow-heif ]; 45 }; 46 47 nativeCheckInputs = [ 48 numpy 49 opencv4 50 pytestCheckHook 51 pillow 52 wand 53 ] ++ passthru.optional-dependencies.heif; 54 55 meta = with lib; { 56 description = "A Python image library that sits on top of Pillow, Wand and OpenCV"; 57 homepage = "https://github.com/torchbox/Willow/"; 58 license = licenses.bsd2; 59 maintainers = with maintainers; [ desiderius ]; 60 }; 61}