depot/third_party/nixpkgs/pkgs/development/python-modules/duckduckgo-search/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

55 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
click,
fetchFromGitHub,
pythonOlder,
setuptools,
orjson,
pyreqwest-impersonate,
curl-cffi,
# Optional dependencies
lxml,
}:
buildPythonPackage rec {
pname = "duckduckgo-search";
version = "v5.3.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "deedy5";
repo = "duckduckgo_search";
rev = version;
hash = "sha256-T7rlB3dU7y+HbHr1Ss9KkejlXFORhnv9Va7cFTRtfQU=";
};
build-system = [ setuptools ];
dependencies = [
click
curl-cffi
orjson
pyreqwest-impersonate
];
passthru.optional-dependencies = {
lxml = [ lxml ];
};
doCheck = false; # tests require network access
pythonImportsCheck = [ "duckduckgo_search" ];
meta = {
description = "Python CLI and library for searching for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine";
mainProgram = "ddgs";
homepage = "https://github.com/deedy5/duckduckgo_search";
changelog = "https://github.com/deedy5/duckduckgo_search/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ drawbu ];
};
}