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