2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
2023-10-09 19:29:22 +00:00
|
|
|
, aiofiles
|
2024-01-02 11:29:13 +00:00
|
|
|
, buildPythonPackage
|
2023-04-12 12:48:02 +00:00
|
|
|
, click
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, h2
|
|
|
|
, httpx
|
|
|
|
, lxml
|
2024-01-02 11:29:13 +00:00
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, requests
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
, socksio
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duckduckgo-search";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.0";
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-OZFkSFyXC2MFP2MbKwF/qR8zvCFzPKgLmX+nuIztOpw=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
aiofiles
|
2023-04-12 12:48:02 +00:00
|
|
|
click
|
2023-10-09 19:29:22 +00:00
|
|
|
h2
|
|
|
|
httpx
|
|
|
|
lxml
|
|
|
|
requests
|
|
|
|
socksio
|
|
|
|
] ++ httpx.optional-dependencies.brotli
|
|
|
|
++ httpx.optional-dependencies.http2
|
|
|
|
++ httpx.optional-dependencies.socks;
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"duckduckgo_search"
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
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-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/deedy5/duckduckgo_search/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
}
|