2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2022-04-15 01:41:22 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-04-15 01:41:22 +00:00
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, imageio-ffmpeg
|
|
|
|
, numpy
|
2021-05-20 23:08:51 +00:00
|
|
|
, pillow
|
|
|
|
, psutil
|
|
|
|
, pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
, tifffile
|
2022-04-15 01:41:22 +00:00
|
|
|
, fsspec
|
|
|
|
, libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imageio";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "2.27.0";
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-7iaclXeF7wNzzHpzIxhZVtg+wF5s3yC0KgO6e3SsWMY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./libgl-path.patch;
|
|
|
|
libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
imageio-ffmpeg
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
fsspec
|
2021-05-20 23:08:51 +00:00
|
|
|
psutil
|
|
|
|
pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
tifffile
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not needs_internet'"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export IMAGEIO_USERDIR="$TMP"
|
2022-04-15 01:41:22 +00:00
|
|
|
export HOME=$TMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTestPaths = [
|
2022-04-15 01:41:22 +00:00
|
|
|
# tries to fetch fixtures over the network
|
|
|
|
"tests/test_freeimage.py"
|
2021-12-26 17:43:05 +00:00
|
|
|
"tests/test_pillow.py"
|
2022-04-15 01:41:22 +00:00
|
|
|
"tests/test_spe.py"
|
|
|
|
"tests/test_swf.py"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats";
|
|
|
|
homepage = "http://imageio.github.io/";
|
|
|
|
license = licenses.bsd2;
|
2022-09-30 11:47:45 +00:00
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|