Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage 2, fetchFromGitHub 3, lib 4, setuptools 5, aiofiles 6, click 7, h2 8, httpx 9, lxml 10, requests 11, socksio 12}: 13 14buildPythonPackage rec { 15 pname = "duckduckgo-search"; 16 version = "3.8.5"; 17 18 src = fetchFromGitHub { 19 owner = "deedy5"; 20 repo = "duckduckgo_search"; 21 rev = "v${version}"; 22 hash = "sha256-FOGMqvr5+O3+UTdM0m1nJBAcemP6hpAOXv0elvnCUHU="; 23 }; 24 25 format = "pyproject"; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ 30 aiofiles 31 click 32 h2 33 httpx 34 lxml 35 requests 36 socksio 37 ] ++ httpx.optional-dependencies.brotli 38 ++ httpx.optional-dependencies.http2 39 ++ httpx.optional-dependencies.socks; 40 41 pythonImportsCheck = [ "duckduckgo_search" ]; 42 43 meta = { 44 description = "A python CLI and library for searching for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine"; 45 homepage = "https://github.com/deedy5/duckduckgo_search"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ ]; 48 }; 49}