depot/third_party/nixpkgs/pkgs/development/python-modules/duckduckgo-search/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
click,
fetchFromGitHub,
pythonOlder,
setuptools,
pyreqwest-impersonate,
# Optional dependencies
lxml,
}:
buildPythonPackage rec {
pname = "duckduckgo-search";
version = "6.1.12";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "deedy5";
repo = "duckduckgo_search";
rev = "refs/tags/v${version}";
hash = "sha256-HidBPd69Fihx6+fGifil0PSZ7lGfW+qStzma8Npfmes=";
};
build-system = [ setuptools ];
dependencies = [
click
pyreqwest-impersonate
];
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 ];
};
}