@@ -2,6 +2,7 @@
22, python3Packages
33, rtmpdump
44, ffmpeg
5+, fetchpatch
56}:
67
78python3Packages.buildPythonApplication rec {
@@ -33,11 +34,14 @@ python3Packages.buildPythonApplication rec {
3334 ffmpeg
3435 ];
3536
36− # note that upstream currently uses requests 2.25.1 in Windows builds
37− postPatch = ''
38− substituteInPlace setup.py \
39− --replace 'requests>=2.26.0,<3.0' 'requests'
40− '';
37+ patches = [
38+ # Patch failing tests to expect correct Accept-Encoding as generated by Requests
39+ (fetchpatch {
40+ url = "https://github.com/streamlink/streamlink/commit/ae747a113199c119bced4613d33edcc67a222bb9.patch";
41+ includes = [ "tests/test_stream_json.py" ];
42+ sha256 = "sha256-KEgyWdh5DNgNktmLSvKQowUQO9p9Q7zP4NbCQJPNgKw=";
43+ })
44+ ];
4145
4246 meta = with lib; {
4347 homepage = "https://streamlink.github.io/";