git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #138201 from DeeUnderscore/streamlink-patch-tests

streamlink: patch tests for compatibility with Requests 2.26

commit2c2a20a207156760216e3dc0f86cffcf83686332 authorBobby Rong <rjl931189261@126.com> dateSat 18 Sep 2021, 10:30 (5 years ago) parente7b6d11299d4d7
1 file changed+9−5
pkgs/applications/video/streamlink/default.nix+9−5
pkgs/applications/video/streamlink/default.nix+9−5
@@ -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/";