2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-03-05 16:20:37 +00:00
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, chardet
|
|
|
|
, cssselect
|
|
|
|
, lxml
|
2022-06-16 17:23:12 +00:00
|
|
|
, timeout-decorator
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "readability-lxml";
|
|
|
|
version = "0.8.1";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "buriy";
|
|
|
|
repo = "python-readability";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-MKdQRety24qOG9xgIdaCJ72XEImP42SlMG6tC7bwzo4=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ chardet cssselect lxml ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace 'sys.platform == "darwin"' "False"
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
timeout-decorator
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-03-05 16:20:37 +00:00
|
|
|
description = "Fast python port of arc90's readability tool";
|
|
|
|
homepage = "https://github.com/buriy/python-readability";
|
|
|
|
license = licenses.apsl20;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
};
|
|
|
|
}
|