Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / ffmpeg-python / default.nix
blob0fb0c68d4cba589d86a8baa8176c5c1f97de8750
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , ffmpeg_4
5 , future
6 , pytest-mock
7 , pytestCheckHook
8 , pythonAtLeast
9 , pythonOlder
10 , substituteAll
13 buildPythonPackage rec {
14   pname = "ffmpeg-python";
15   version = "0.2.0";
16   format = "setuptools";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "kkroening";
22     repo = "ffmpeg-python";
23     rev = version;
24     hash = "sha256-Dk3nHuYVlIiFF6nORZ5TVFkBXdoZUxLfoiz68V1tvlY=";
25   };
27   propagatedBuildInputs = [
28     future
29   ];
31   nativeCheckInputs = [
32     pytestCheckHook
33     pytest-mock
34   ];
36   patches = [
37     (substituteAll {
38       src = ./ffmpeg-location.patch;
39       ffmpeg = ffmpeg_4;
40     })
41   ];
43   postPatch = ''
44     substituteInPlace setup.py \
45       --replace "'pytest-runner'" ""
46   '';
48   pythonImportsCheck = [
49     "ffmpeg"
50   ];
52   disabledTests = lib.optionals (pythonAtLeast "3.10") [
53     "test__output__video_size"
54   ];
56   meta = with lib; {
57     description = "Python bindings for FFmpeg - with complex filtering support";
58     homepage = "https://github.com/kkroening/ffmpeg-python";
59     license = licenses.asl20;
60     maintainers = with maintainers; [ AluisioASG ];
61   };