2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
dnspython,
|
|
|
|
fetchPypi,
|
|
|
|
filelock,
|
|
|
|
idna,
|
|
|
|
platformdirs,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
uritools,
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "urlextract";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.9.0";
|
|
|
|
pyproject = true;
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-cFCOArqd83LiXPBkLbNnzs4nPocSzQzngXj8XdfqANs=";
|
2021-10-01 09:20:50 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
filelock
|
|
|
|
idna
|
2022-01-13 20:06:32 +00:00
|
|
|
platformdirs
|
2021-10-01 09:20:50 +00:00
|
|
|
uritools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-01 09:20:50 +00:00
|
|
|
dnspython
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# fails with dns.resolver.NoResolverConfiguration due to network sandboxing
|
|
|
|
"test_check_dns_enabled"
|
|
|
|
"test_check_dns_find_urls"
|
|
|
|
"test_dns_cache_init"
|
|
|
|
"test_dns_cache_negative"
|
|
|
|
"test_dns_cache_reuse"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "urlextract" ];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Collects and extracts URLs from given text";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "urlextract";
|
2021-10-01 09:20:50 +00:00
|
|
|
homepage = "https://github.com/lipoja/URLExtract";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/lipoja/URLExtract/releases/tag/v${version}";
|
2021-10-01 09:20:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ilkecan ];
|
|
|
|
};
|
|
|
|
}
|