19 # optional-dependencies
32 buildPythonPackage rec {
37 src = fetchFromGitHub {
40 rev = "refs/tags/v${version}";
41 hash = "sha256-dQrAVPXtDdibaxxfqW29qY7j5LyegvmI0Y7/btXmsyY=";
44 patches = lib.optionals (!stdenv.hostPlatform.isDarwin) [
46 src = ./libgl-path.patch;
47 libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}";
51 build-system = [ setuptools ];
58 optional-dependencies = {
66 fits = lib.optionals (!isPyPy) [ astropy ];
74 tifffile = [ tifffile ];
76 heif = [ pillow-heif ];
83 ] ++ fsspec.optional-dependencies.github ++ lib.flatten (builtins.attrValues optional-dependencies);
85 pytestFlagsArray = [ "-m 'not needs_internet'" ];
88 export IMAGEIO_USERDIR="$TMP"
93 # tries to fetch fixtures over the network
94 "tests/test_freeimage.py"
95 "tests/test_pillow.py"
102 # Pillow 11.0.0 compat
103 # https://github.com/imageio/imageio/issues/1104
106 ++ lib.optionals stdenv.hostPlatform.isDarwin [
109 # RuntimeError: No valid H.264 encoder was found with the ffmpeg installation
110 "test_writer_file_properly_closed"
111 "test_writer_pixelformat_size_verbose"
112 "test_writer_ffmpeg_params"
117 description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats";
118 homepage = "https://imageio.readthedocs.io";
119 changelog = "https://github.com/imageio/imageio/blob/v${version}/CHANGELOG.md";
120 license = lib.licenses.bsd2;
121 maintainers = with lib.maintainers; [ Luflosi ];