diff options
Diffstat (limited to 'pkgs/applications/video/streamlink')
-rw-r--r-- | pkgs/applications/video/streamlink/default.nix | 23 | ||||
-rw-r--r-- | pkgs/applications/video/streamlink/ffmpeg-path.patch | 13 |
2 files changed, 32 insertions, 4 deletions
diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix index 2eda19313e1c..c71e712625c2 100644 --- a/pkgs/applications/video/streamlink/default.nix +++ b/pkgs/applications/video/streamlink/default.nix @@ -1,19 +1,31 @@ { lib , python3Packages , fetchPypi +, substituteAll , ffmpeg }: python3Packages.buildPythonApplication rec { pname = "streamlink"; version = "6.7.0"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-kjrDJ/QCccWxRLEQ0virAdm0TLxN5PmtO/Zs+4Nc1MM="; }; + patches = [ + (substituteAll { + src = ./ffmpeg-path.patch; + ffmpeg = lib.getExe ffmpeg; + }) + ]; + + nativeBuildInputs = with python3Packages; [ + setuptools + ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook mock @@ -23,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 @@ -36,8 +53,6 @@ python3Packages.buildPythonApplication rec { typing-extensions urllib3 websocket-client - ]) ++ [ - ffmpeg ]; meta = with lib; { diff --git a/pkgs/applications/video/streamlink/ffmpeg-path.patch b/pkgs/applications/video/streamlink/ffmpeg-path.patch new file mode 100644 index 000000000000..6108c53dcf0b --- /dev/null +++ b/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" |