2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-03 20:48:10 +00:00
|
|
|
, ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
, future
|
|
|
|
, pytest-mock
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ffmpeg-python";
|
|
|
|
version = "0.2.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kkroening";
|
|
|
|
repo = "ffmpeg-python";
|
|
|
|
rev = version;
|
2022-03-05 16:20:37 +00:00
|
|
|
hash = "sha256-Dk3nHuYVlIiFF6nORZ5TVFkBXdoZUxLfoiz68V1tvlY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
2021-05-03 20:48:10 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./ffmpeg-location.patch;
|
|
|
|
inherit ffmpeg;
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ffmpeg"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
"test__output__video_size"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for FFmpeg - with complex filtering support";
|
|
|
|
homepage = "https://github.com/kkroening/ffmpeg-python";
|
|
|
|
license = licenses.asl20;
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with maintainers; [ AluisioASG ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|