1{ lib, buildPythonPackage, fetchPypi, fetchpatch 2, pytest, pytest-runner, hypothesis }: 3 4buildPythonPackage rec { 5 pname = "chardet"; 6 version = "3.0.4"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"; 11 }; 12 13 patches = [ 14 # Add pytest 4 support. See: https://github.com/chardet/chardet/pull/174 15 (fetchpatch { 16 url = "https://github.com/chardet/chardet/commit/0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4.patch"; 17 sha256 = "1y1xhjf32rdhq9sfz58pghwv794f3w2f2qcn8p6hp4pc8jsdrn2q"; 18 }) 19 ]; 20 21 checkInputs = [ pytest pytest-runner hypothesis ]; 22 23 meta = with lib; { 24 homepage = "https://github.com/chardet/chardet"; 25 description = "Universal encoding detector"; 26 license = licenses.lgpl2; 27 maintainers = with maintainers; [ domenkozar ]; 28 }; 29}