2023-01-13 06:32:59 +00:00
|
|
|
{ lib
|
2023-01-13 08:50:48 +00:00
|
|
|
, buildPythonPackage
|
2023-01-13 06:32:59 +00:00
|
|
|
, fetchFromGitHub
|
2023-01-13 08:50:48 +00:00
|
|
|
# nativeBuildInputs python packages
|
|
|
|
, poetry-core
|
|
|
|
# propagatedBuildInputs python packages
|
|
|
|
, aiodns
|
|
|
|
, aiohttp
|
|
|
|
, beautifulsoup4
|
|
|
|
, brotlipy
|
|
|
|
, cchardet
|
|
|
|
, feedparser
|
|
|
|
, python-dateutil
|
|
|
|
, uvloop
|
|
|
|
, w3lib
|
|
|
|
, yarl
|
2023-01-13 06:32:59 +00:00
|
|
|
}:
|
|
|
|
|
2023-01-13 08:50:48 +00:00
|
|
|
buildPythonPackage rec {
|
2023-01-13 06:32:59 +00:00
|
|
|
pname = "feedsearch-crawler";
|
|
|
|
version = "2022-05-28";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DBeath";
|
|
|
|
repo = "feedsearch-crawler";
|
|
|
|
rev = "f49a6f5a07e796e359c4482fd29305b1a019f71f";
|
|
|
|
hash = "sha256-pzvyeXzqdi8pRjk2+QjKhJfgtxbgVT6C08K9fhVFVmY=";
|
|
|
|
};
|
|
|
|
|
2023-01-25 09:44:32 +00:00
|
|
|
patches = [
|
|
|
|
# fix for <https://github.com/aio-libs/aiohttp/issues/4581>
|
|
|
|
# where large feeds would timeout in an unrecoverable way
|
|
|
|
./0001-response-chunk-size.patch
|
|
|
|
];
|
|
|
|
|
2023-01-13 08:50:48 +00:00
|
|
|
nativeBuildInputs = [
|
2023-01-13 06:32:59 +00:00
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-19 23:31:54 +00:00
|
|
|
--replace-fail 'w3lib = "^1.22.0"' 'w3lib = "*"' \
|
|
|
|
--replace-fail 'aiodns = "^2.0.0"' 'aiodns = "*"' \
|
|
|
|
--replace-fail 'uvloop = "^0.15.2"' 'uvloop = "*"'
|
2023-01-13 06:32:59 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-13 08:50:48 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-13 06:32:59 +00:00
|
|
|
aiodns
|
|
|
|
aiohttp
|
|
|
|
beautifulsoup4
|
|
|
|
brotlipy
|
|
|
|
cchardet
|
|
|
|
feedparser
|
|
|
|
python-dateutil
|
|
|
|
uvloop
|
|
|
|
w3lib
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-01-13 08:50:48 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"feedsearch_crawler"
|
|
|
|
];
|
|
|
|
|
2023-01-13 06:32:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://feedsearch.dev";
|
|
|
|
description = "Crawl sites for RSS, Atom, and JSON feeds";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ colinsane ];
|
|
|
|
};
|
|
|
|
}
|