2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchPypi
|
|
|
|
, substituteAll
|
|
|
|
, ffmpeg
|
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imageio-ffmpeg";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.4.3";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "f826260a3207b872f1a4ba87ec0c8e02c00afba4fd03348a59049bdd8215841e";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./ffmpeg-path.patch;
|
|
|
|
ffmpeg = "${ffmpeg}/bin/ffmpeg";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
${python.interpreter} << EOF
|
|
|
|
from imageio_ffmpeg import get_ffmpeg_version
|
|
|
|
assert get_ffmpeg_version() == '${ffmpeg.version}'
|
|
|
|
EOF
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "imageio_ffmpeg" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "FFMPEG wrapper for Python";
|
|
|
|
homepage = "https://github.com/imageio/imageio-ffmpeg";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.pmiddend ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|