1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 tqdm, 8 pytest-asyncio, 9 pytestCheckHook, 10 pythonOlder, 11 ffmpeg, 12 procps, 13}: 14 15buildPythonPackage rec { 16 pname = "ffmpeg-progress-yield"; 17 version = "1.0.2"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "slhck"; 24 repo = "ffmpeg-progress-yield"; 25 tag = "v${version}"; 26 hash = "sha256-tX4CioyhZvHNe5PItNwCF68ZQhs4fpG1ZrloGtei07I="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ 32 tqdm 33 ]; 34 35 nativeCheckInputs = [ 36 pytest-asyncio 37 pytestCheckHook 38 ffmpeg 39 procps 40 ]; 41 42 enabledTestPaths = [ "test/test.py" ]; 43 44 disabledTests = lib.optional stdenv.hostPlatform.isDarwin [ 45 # cannot access /usr/bin/pgrep from the sandbox 46 "test_context_manager" 47 "test_context_manager_with_exception" 48 "test_automatic_cleanup_on_exception" 49 "test_async_context_manager" 50 "test_async_context_manager_with_exception" 51 "test_async_automatic_cleanup_on_exception" 52 ]; 53 54 pythonImportsCheck = [ "ffmpeg_progress_yield" ]; 55 56 meta = with lib; { 57 description = "Run an ffmpeg command with progress"; 58 mainProgram = "ffmpeg-progress-yield"; 59 homepage = "https://github.com/slhck/ffmpeg-progress-yield"; 60 changelog = "https://github.com/slhck/ffmpeg-progress-yield/blob/v${version}/CHANGELOG.md"; 61 license = with licenses; [ mit ]; 62 maintainers = with maintainers; [ prusnak ]; 63 }; 64}