@@ -1,4 +1,4 @@
1−{ lib, buildPythonPackage, fetchFromGitHub, requests, iso8601, bottle, pytestCheckHook }:
1+{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, requests, iso8601, bottle, pytestCheckHook }:
22
33buildPythonPackage rec {
44 pname = "m3u8";
@@ -11,6 +11,14 @@ buildPythonPackage rec {
1111 sha256 = "sha256-EfHhmV2otEgEy2OVohS+DF7dk97GFdWZ4cFCERZBmlA=";
1212 };
1313
14+ patches = [
15+ # Fix hardcoded /tmp dir (fix build on Hydra)
16+ (fetchpatch {
17+ url = "https://github.com/globocom/m3u8/commit/cf7ae5fda4681efcea796cd7c51c02f152c36009.patch";
18+ sha256 = "sha256-SEETpIJQddid8D//6DVrSGs/BqDeMOzufE0bBrm+/xY=";
19+ })
20+ ];
21+
1422 propagatedBuildInputs = [ requests iso8601 ];
1523
1624 checkInputs = [ bottle pytestCheckHook ];
@@ -21,11 +29,6 @@ buildPythonPackage rec {
2129 "tests/test_variant_m3u8.py"
2230 ];
2331
24− preCheck = ''
25− # Fix test on Hydra
26− substituteInPlace tests/test_model.py --replace "/tmp/d.m3u8" "$TMPDIR/d.m3u8"
27− '';
28−
2932 meta = with lib; {
3033 homepage = "https://github.com/globocom/m3u8";
3134 description = "Python m3u8 parser";