2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2024-06-20 14:57:18 +00:00
|
|
|
pyreqwest-impersonate,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
# Optional dependencies
|
|
|
|
lxml,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duckduckgo-search";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "6.1.12";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deedy5";
|
|
|
|
repo = "duckduckgo_search";
|
2024-07-27 06:49:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-HidBPd69Fihx6+fGifil0PSZ7lGfW+qStzma8Npfmes=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2023-04-12 12:48:02 +00:00
|
|
|
click
|
2024-06-20 14:57:18 +00:00
|
|
|
pyreqwest-impersonate
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
optional-dependencies = {
|
2024-05-15 15:35:15 +00:00
|
|
|
lxml = [ lxml ];
|
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = false; # tests require network access
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "duckduckgo_search" ];
|
|
|
|
|
|
|
|
meta = {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Python CLI and library for searching for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ddgs";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/deedy5/duckduckgo_search";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/deedy5/duckduckgo_search/releases/tag/${version}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ drawbu ];
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
}
|