1{ lib, fetchpatch 2, buildPythonPackage, fetchPypi, isPy3k 3, beautifulsoup4, lxml, cssutils, future, enum34, six 4}: 5 6buildPythonPackage rec { 7 pname = "pycaption"; 8 version = "1.0.1"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "0f2hx9ky65c4niws3x5yx59yi8mqqrw9b2cghd220g4hj9yl800h"; 13 }; 14 15 disabled = !isPy3k; 16 17 prePatch = '' 18 substituteInPlace setup.py \ 19 --replace 'beautifulsoup4>=4.2.1,<4.5.0' \ 20 'beautifulsoup4>=4.2.1,<5' 21 ''; 22 23 # don't require enum34 on python >= 3.4 24 patches = [ 25 (fetchpatch { 26 url = "https://github.com/pbs/pycaption/pull/161.patch"; 27 sha256 = "0p58awpsqx1qc3x9zfl1gd85h1nk7204lzn4kglsgh1bka0j237j"; 28 }) 29 ]; 30 31 propagatedBuildInputs = [ beautifulsoup4 lxml cssutils future enum34 six ]; 32 33 # Tests not included in pypi (?) 34 doCheck = false; 35 36 meta = with lib; { 37 description = "Closed caption converter"; 38 homepage = "https://github.com/pbs/pycaption"; 39 license = with licenses; [ asl20 ]; 40 }; 41}