Loading pkgs/applications/audio/r128gain/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -9,13 +9,13 @@ python3Packages.buildPythonApplication rec { pname = "r128gain"; version = "1.0.3"; version = "1.0.7"; src = fetchFromGitHub { owner = "desbma"; repo = "r128gain"; rev = version; sha256 = "0w2i2szajv1vcmc96w0fczdr8xc28ijcf1gdg180f21gi6yh96sc"; sha256 = "sha256-JyKacDqjIKTNl2GjbJPkgbakF8HR4Jd4czAtOaemDH8="; }; patches = [ Loading pkgs/applications/audio/r128gain/ffmpeg-location.patch +30 −28 Original line number Diff line number Diff line --- i/r128gain/__init__.py +++ w/r128gain/__init__.py @@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None): diff --git a/r128gain/__init__.py b/r128gain/__init__.py index 79a5cbd..d8f13ba 100755 --- a/r128gain/__init__.py +++ b/r128gain/__init__.py @@ -86,7 +86,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path: Optional[str] = None) -> Dict[str, int] Example: 0x3040100 for FFmpeg 3.4.1 """ r = collections.OrderedDict() - cmd = (ffmpeg_path or "ffmpeg", "-version") + cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version") output = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, @@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin os.devnull, **additional_ffmpeg_args, f="null").global_args("-hide_banner", "-nostats"), - cmd=ffmpeg_path or "ffmpeg") + cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg") output_str = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True).stdout output_lines = output_str.splitlines() lib_version_regex = re.compile(r"^\s*(lib[a-z]+)\s+([0-9]+).\s*([0-9]+).\s*([0-9]+)\s+") @@ -194,7 +194,7 @@ def get_r128_loudness( # noqa: C901 ffmpeg.output(*output_streams, os.devnull, **additional_ffmpeg_args, f="null").global_args( "-hide_banner", "-nostats" ), - cmd=ffmpeg_path or "ffmpeg", + cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg", ) # run logger().debug(cmd_to_string(cmd)) @@ -740,7 +740,7 @@ def cl_main(): help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count") arg_parser.add_argument("-f", @@ -885,7 +885,7 @@ def cl_main() -> None: arg_parser.add_argument( "-f", "--ffmpeg-path", - default=shutil.which("ffmpeg"), + default="@ffmpeg@/bin/ffmpeg", help="""Full file path of ffmpeg executable (only needed if not in PATH). If not specified, autodetect""") arg_parser.add_argument("-d", If not specified, autodetect""", ) Loading
pkgs/applications/audio/r128gain/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -9,13 +9,13 @@ python3Packages.buildPythonApplication rec { pname = "r128gain"; version = "1.0.3"; version = "1.0.7"; src = fetchFromGitHub { owner = "desbma"; repo = "r128gain"; rev = version; sha256 = "0w2i2szajv1vcmc96w0fczdr8xc28ijcf1gdg180f21gi6yh96sc"; sha256 = "sha256-JyKacDqjIKTNl2GjbJPkgbakF8HR4Jd4czAtOaemDH8="; }; patches = [ Loading
pkgs/applications/audio/r128gain/ffmpeg-location.patch +30 −28 Original line number Diff line number Diff line --- i/r128gain/__init__.py +++ w/r128gain/__init__.py @@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None): diff --git a/r128gain/__init__.py b/r128gain/__init__.py index 79a5cbd..d8f13ba 100755 --- a/r128gain/__init__.py +++ b/r128gain/__init__.py @@ -86,7 +86,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path: Optional[str] = None) -> Dict[str, int] Example: 0x3040100 for FFmpeg 3.4.1 """ r = collections.OrderedDict() - cmd = (ffmpeg_path or "ffmpeg", "-version") + cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version") output = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, @@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin os.devnull, **additional_ffmpeg_args, f="null").global_args("-hide_banner", "-nostats"), - cmd=ffmpeg_path or "ffmpeg") + cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg") output_str = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True).stdout output_lines = output_str.splitlines() lib_version_regex = re.compile(r"^\s*(lib[a-z]+)\s+([0-9]+).\s*([0-9]+).\s*([0-9]+)\s+") @@ -194,7 +194,7 @@ def get_r128_loudness( # noqa: C901 ffmpeg.output(*output_streams, os.devnull, **additional_ffmpeg_args, f="null").global_args( "-hide_banner", "-nostats" ), - cmd=ffmpeg_path or "ffmpeg", + cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg", ) # run logger().debug(cmd_to_string(cmd)) @@ -740,7 +740,7 @@ def cl_main(): help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count") arg_parser.add_argument("-f", @@ -885,7 +885,7 @@ def cl_main() -> None: arg_parser.add_argument( "-f", "--ffmpeg-path", - default=shutil.which("ffmpeg"), + default="@ffmpeg@/bin/ffmpeg", help="""Full file path of ffmpeg executable (only needed if not in PATH). If not specified, autodetect""") arg_parser.add_argument("-d", If not specified, autodetect""", )