python310Packages.duckduckgo-search: refactor

This commit is contained in:
Fabian Affolter 2023-12-01 11:11:35 +01:00 committed by Weijia Wang
parent 13dd600bf6
commit f157aba7fa

View file

@ -1,19 +1,23 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
, setuptools
{ lib
, aiofiles
, buildPythonPackage
, click
, fetchFromGitHub
, h2
, httpx
, lxml
, pythonOlder
, requests
, setuptools
, socksio
}:
buildPythonPackage rec {
pname = "duckduckgo-search";
version = "3.9.9";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "deedy5";
@ -22,9 +26,9 @@ buildPythonPackage rec {
hash = "sha256-swuMCobYF5u41O1Qp5Gx/n8BIgSEnhRVZ5Owk3IPbeI=";
};
format = "pyproject";
nativeBuildInputs = [ setuptools ];
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
aiofiles
@ -38,12 +42,15 @@ buildPythonPackage rec {
++ httpx.optional-dependencies.http2
++ httpx.optional-dependencies.socks;
pythonImportsCheck = [ "duckduckgo_search" ];
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";
meta = with lib; {
description = "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; [ ];
changelog = "https://github.com/deedy5/duckduckgo_search/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}