2018-02-19 16:40:17 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, chardet, hypothesis }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "binaryornot";
|
|
|
|
version = "0.4.4";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061";
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
2019-03-02 14:21:48 +00:00
|
|
|
# TypeError: binary() got an unexpected keyword argument 'average_size'
|
2018-02-19 16:40:17 +00:00
|
|
|
substituteInPlace tests/test_check.py \
|
2019-03-02 14:21:48 +00:00
|
|
|
--replace "average_size=512" ""
|
2018-02-19 16:40:17 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ chardet ];
|
|
|
|
|
|
|
|
checkInputs = [ hypothesis ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/audreyr/binaryornot";
|
2018-02-19 16:40:17 +00:00
|
|
|
description = "Ultra-lightweight pure Python package to check if a file is binary or text";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|