depot/third_party/nixpkgs/pkgs/development/python-modules/duckduckgo-search/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

49 lines
1 KiB
Nix

{ buildPythonPackage
, fetchFromGitHub
, lib
, setuptools
, aiofiles
, click
, h2
, httpx
, lxml
, requests
, socksio
}:
buildPythonPackage rec {
pname = "duckduckgo-search";
version = "3.9.4";
src = fetchFromGitHub {
owner = "deedy5";
repo = "duckduckgo_search";
rev = "refs/tags/v${version}";
hash = "sha256-R96ezs0INIZAXTcD1eWXuj4MSJvCbtbgzgC3ls7wYyI=";
};
format = "pyproject";
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
aiofiles
click
h2
httpx
lxml
requests
socksio
] ++ httpx.optional-dependencies.brotli
++ httpx.optional-dependencies.http2
++ httpx.optional-dependencies.socks;
pythonImportsCheck = [ "duckduckgo_search" ];
meta = {
description = "A python CLI and library for searching for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine";
homepage = "https://github.com/deedy5/duckduckgo_search";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
};
}