blob: 5c70706d8c40c4a2cbbd6b486a48812d47891539 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{
lib,
buildPythonPackage,
fetchPypi,
substituteAll,
ffmpeg_4,
python,
}:
buildPythonPackage rec {
pname = "imageio-ffmpeg";
version = "0.4.9";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-ObzRZgEY7zYPpAR0VlAQcTZGYaqdkCHT0mxY8e4ggfU=";
};
patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = "${ffmpeg_4}/bin/ffmpeg";
})
];
# https://github.com/imageio/imageio-ffmpeg/issues/59
postPatch = ''
sed -i '/setup_requires=\["pip>19"\]/d' setup.py
'';
checkPhase = ''
runHook preCheck
${python.interpreter} << EOF
from imageio_ffmpeg import get_ffmpeg_version
assert get_ffmpeg_version() == '${ffmpeg_4.version}'
EOF
runHook postCheck
'';
pythonImportsCheck = [ "imageio_ffmpeg" ];
meta = with lib; {
description = "FFMPEG wrapper for Python";
homepage = "https://github.com/imageio/imageio-ffmpeg";
license = licenses.bsd2;
maintainers = [ maintainers.pmiddend ];
};
}
|