git.iko.soy/typeable/nixpkgs
on master help sign in
streamlink: patch tests for compatibility with Requests 2.26
commit299d4d72969c9cfd37a94d7c4371aa77b9b02590 authorD Anzorge <d.anzorge@gmail.com> dateFri 17 Sep 2021, 01:06 (5 years ago) parent610ceb5
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/";