1{ lib, buildPythonPackage, fetchPypi, chardet, hypothesis }: 2 3buildPythonPackage rec { 4 pname = "binaryornot"; 5 version = "0.4.4"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"; 10 }; 11 12 prePatch = '' 13 # TypeError: binary() got an unexpected keyword argument 'average_size' 14 substituteInPlace tests/test_check.py \ 15 --replace "average_size=512" "" 16 ''; 17 18 propagatedBuildInputs = [ chardet ]; 19 20 checkInputs = [ hypothesis ]; 21 22 meta = with lib; { 23 homepage = "https://github.com/audreyr/binaryornot"; 24 description = "Ultra-lightweight pure Python package to check if a file is binary or text"; 25 license = licenses.bsd3; 26 }; 27}