Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 66 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 substituteAll, 6 ffmpeg, 7 8 # build-system 9 setuptools, 10 11 # checks 12 psutil, 13 pytestCheckHook, 14 python, 15}: 16 17buildPythonPackage rec { 18 pname = "imageio-ffmpeg"; 19 version = "0.5.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "imageio"; 24 repo = "imageio-ffmpeg"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-i9DBEhRyW5shgnhpaqpPLTI50q+SATJnxur8PAauYX4="; 27 }; 28 29 patches = [ 30 (substituteAll { 31 src = ./ffmpeg-path.patch; 32 ffmpeg = lib.getExe ffmpeg; 33 }) 34 ]; 35 36 build-system = [ setuptools ]; 37 38 nativeCheckInputs = [ 39 psutil 40 pytestCheckHook 41 ]; 42 43 disabledTestPaths = [ 44 # network access 45 "tests/test_io.py" 46 "tests/test_special.py" 47 "tests/test_terminate.py" 48 ]; 49 50 postCheck = '' 51 ${python.interpreter} << EOF 52 from imageio_ffmpeg import get_ffmpeg_version 53 assert get_ffmpeg_version() == '${ffmpeg.version}' 54 EOF 55 ''; 56 57 pythonImportsCheck = [ "imageio_ffmpeg" ]; 58 59 meta = with lib; { 60 changelog = "https://github.com/imageio/imageio-ffmpeg/releases/tag/v${version}"; 61 description = "FFMPEG wrapper for Python"; 62 homepage = "https://github.com/imageio/imageio-ffmpeg"; 63 license = licenses.bsd2; 64 maintainers = [ maintainers.pmiddend ]; 65 }; 66}