13 buildPythonPackage rec {
18 disabled = pythonOlder "3.8.1";
20 src = fetchFromGitHub {
23 rev = "refs/tags/${version}";
24 hash = "sha256-XWI0Hq4vf9Q0/dRzmu1B7EQHdQRkWaNJaBaqusWW7YM=";
28 # default to store ffmpeg
29 substituteInPlace ffmpy.py \
31 'executable: str = "ffmpeg",' \
32 'executable: str = "${ffmpeg-headless}/bin/ffmpeg",'
34 # The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail.
35 for fname in tests/*.py; do
36 echo 'FFmpeg.__init__.__defaults__ = ("ffmpeg", *FFmpeg.__init__.__defaults__[1:])' >>"$fname"
40 pythonImportsCheck = [ "ffmpy" ];
42 nativeBuildInputs = [ poetry-core ];
49 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
50 # expects a FFExecutableNotFoundError, gets a NotADirectoryError raised by os
51 "test_invalid_executable_path"
54 # the vendored ffmpeg mock binary assumes FHS
56 rm -v tests/ffmpeg/ffmpeg
57 echo Building tests/ffmpeg/ffmpeg...
58 HOME=$(mktemp -d) go build -o tests/ffmpeg/ffmpeg tests/ffmpeg/ffmpeg.go
62 description = "Simple python interface for FFmpeg/FFprobe";
63 homepage = "https://github.com/Ch00k/ffmpy";
64 license = licenses.mit;
65 maintainers = with maintainers; [ pbsds ];