Files
nixpkgs/pkgs/development/python-modules/binaryornot/default.nix
Fabian Affolter 6ccddc4a29 python3Packages.binaryornot: 0.4.4 -> 0.6.0
This commit was automatically generated using update-python-libraries.
2026-08-25 01:24:10 +02:00

42 lines
887 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
chardet,
hypothesis,
}:
buildPythonPackage (finalAttrs: {
pname = "binaryornot";
version = "0.6.0";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-zI1Xz6cddP+MKKdyZzTVOoUdAvrZ46VYH7gH+Yn3AvA=";
};
build-system = [ setuptools ];
prePatch = ''
# TypeError: binary() got an unexpected keyword argument 'average_size'
substituteInPlace tests/test_check.py \
--replace-fail "average_size=512" ""
'';
dependencies = [ chardet ];
nativeCheckInputs = [ hypothesis ];
pythonImportsCheck = [ "binaryornot" ];
meta = {
homepage = "https://github.com/audreyr/binaryornot";
description = "Ultra-lightweight pure Python package to check if a file is binary or text";
license = lib.licenses.bsd3;
};
})