From 0e691ca3e8f4e645f435f7ad3ad22cf58da3c5da Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 28 Jul 2026 18:37:19 -0400 Subject: [PATCH] python3Packages.pydub: don't warn on calls to ffmpeg The replacement was done in the codepath that is a fallback that triggers a warning. So even though the library was ultimately calling to the right nixpkgs binaries for ffmpeg tools, each call resulted in a confusing warning like: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work --- .../pydub/ffmpeg-fix-path.patch | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/pydub/ffmpeg-fix-path.patch b/pkgs/development/python-modules/pydub/ffmpeg-fix-path.patch index 1da979dcec8e..95c9f0292b05 100644 --- a/pkgs/development/python-modules/pydub/ffmpeg-fix-path.patch +++ b/pkgs/development/python-modules/pydub/ffmpeg-fix-path.patch @@ -1,28 +1,28 @@ diff --git a/pydub/utils.py b/pydub/utils.py -index 2694f90..7764b3f 100644 +index 740c500..e741100 100644 --- a/pydub/utils.py +++ b/pydub/utils.py -@@ -172,7 +172,7 @@ def get_encoder_name(): - else: - # should raise exception - warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) +@@ -164,5 +164,5 @@ def get_encoder_name(): + if which("avconv"): + return "avconv" +- elif which("ffmpeg"): - return "ffmpeg" ++ elif which("@ffmpeg@"): + return "@ffmpeg@" - - - def get_player_name(): -@@ -186,7 +186,7 @@ def get_player_name(): else: - # should raise exception - warn("Couldn't find ffplay or avplay - defaulting to ffplay, but may not work", RuntimeWarning) +@@ -178,5 +178,5 @@ def get_player_name(): + if which("avplay"): + return "avplay" +- elif which("ffplay"): - return "ffplay" ++ elif which("@ffplay@"): + return "@ffplay@" - - - def get_prober_name(): -@@ -200,7 +200,7 @@ def get_prober_name(): else: - # should raise exception - warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning) +@@ -192,5 +192,5 @@ def get_prober_name(): + if which("avprobe"): + return "avprobe" +- elif which("ffprobe"): - return "ffprobe" ++ elif which("@ffprobe@"): + return "@ffprobe@" + else: