2020-02-11 15:02:07 -03:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-08-04 00:18:44 +01:00
|
|
|
substituteAll,
|
|
|
|
setuptools,
|
2020-02-11 15:02:07 -03:00
|
|
|
future,
|
2022-03-05 10:10:30 +01:00
|
|
|
pytestCheckHook,
|
2024-08-04 00:18:44 +01:00
|
|
|
pytest-mock,
|
|
|
|
ffmpeg_4,
|
2022-03-05 10:10:30 +01:00
|
|
|
pythonAtLeast,
|
2020-02-11 15:02:07 -03:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ffmpeg-python";
|
|
|
|
version = "0.2.0";
|
2024-08-04 00:18:44 +01:00
|
|
|
pyproject = true;
|
2020-02-11 15:02:07 -03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kkroening";
|
|
|
|
repo = "ffmpeg-python";
|
|
|
|
rev = version;
|
2022-03-05 10:10:30 +01:00
|
|
|
hash = "sha256-Dk3nHuYVlIiFF6nORZ5TVFkBXdoZUxLfoiz68V1tvlY=";
|
2020-02-11 15:02:07 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-04-26 16:51:33 -03:00
|
|
|
(substituteAll {
|
|
|
|
src = ./ffmpeg-location.patch;
|
2023-03-03 19:41:10 +01:00
|
|
|
ffmpeg = ffmpeg_4;
|
2021-04-26 16:51:33 -03:00
|
|
|
})
|
2020-02-11 15:02:07 -03:00
|
|
|
];
|
|
|
|
|
2024-08-04 00:18:44 +01:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ future ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
2022-03-05 10:10:30 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ffmpeg" ];
|
|
|
|
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [ "test__output__video_size" ];
|
2020-02-11 15:02:07 -03:00
|
|
|
|
2024-08-04 00:18:44 +01:00
|
|
|
meta = {
|
2020-02-11 15:02:07 -03:00
|
|
|
description = "Python bindings for FFmpeg - with complex filtering support";
|
|
|
|
homepage = "https://github.com/kkroening/ffmpeg-python";
|
2024-08-04 00:18:44 +01:00
|
|
|
license = lib.licenses.asl20;
|
2024-08-04 02:50:25 +01:00
|
|
|
maintainers = [ ];
|
2020-02-11 15:02:07 -03:00
|
|
|
};
|
|
|
|
}
|