Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 pythonRelaxDeps = [ "defusedxml" ]; 39 40 propagatedBuildInputs = [ 41 filetype 42 defusedxml 43 ]; 44 45 passthru.optional-dependencies = { 46 heif = [ pillow-heif ]; 47 }; 48 49 nativeCheckInputs = [ 50 numpy 51 opencv4 52 pytestCheckHook 53 pillow 54 wand 55 ] ++ passthru.optional-dependencies.heif; 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 license = licenses.bsd2; 61 maintainers = with maintainers; [ desiderius ]; 62 }; 63}