f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
51 lines
1.1 KiB
Nix
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 ];
|
|
};
|
|
}
|