Skip to content

Commit

Permalink
streamlink: don't propagate ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Mar 13, 2024
1 parent c71f1fc commit 0f78935
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pkgs/applications/video/streamlink/default.nix
@@ -1,6 +1,7 @@
{ lib
, python3Packages
, fetchPypi
, substituteAll
, ffmpeg
}:

Expand All @@ -14,6 +15,13 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-0UF8fFmG3BQ7xxHIqZ97iEsQ0lg/RLHD2t6n3wp15NU=";
};

patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = lib.getExe ffmpeg;
})
];

nativeBuildInputs = with python3Packages; [
setuptools
];
Expand All @@ -27,7 +35,12 @@ python3Packages.buildPythonApplication rec {
pytest-trio
];

propagatedBuildInputs = (with python3Packages; [
disabledTests = [
# requires ffmpeg to be in PATH
"test_no_cache"
];

propagatedBuildInputs = with python3Packages; [
certifi
isodate
lxml
Expand All @@ -40,8 +53,6 @@ python3Packages.buildPythonApplication rec {
typing-extensions
urllib3
websocket-client
]) ++ [
ffmpeg
];

meta = with lib; {
Expand Down
13 changes: 13 additions & 0 deletions pkgs/applications/video/streamlink/ffmpeg-path.patch
@@ -0,0 +1,13 @@
diff --git a/src/streamlink/stream/ffmpegmux.py b/src/streamlink/stream/ffmpegmux.py
index 258b314a..c493e010 100644
--- a/src/streamlink/stream/ffmpegmux.py
+++ b/src/streamlink/stream/ffmpegmux.py
@@ -80,7 +80,7 @@ class MuxedStream(Stream, Generic[TSubstreams]):


class FFMPEGMuxer(StreamIO):
- __commands__: ClassVar[List[str]] = ["ffmpeg"]
+ __commands__: ClassVar[List[str]] = ["@ffmpeg@"]

DEFAULT_OUTPUT_FORMAT = "matroska"
DEFAULT_VIDEO_CODEC = "copy"

0 comments on commit 0f78935

Please sign in to comment.