2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-07-18 16:21:45 +00:00
|
|
|
pname = "searxng";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "unstable-2023-05-19";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "d867bf17e6d2f9a7c83c9a1ffafda5184a24c0e3";
|
|
|
|
sha256 = "sha256-W7/8/3FzwErPkRlfuyqajova6LRKarANPtc6L/z20CI=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/==.*$//' requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export SEARX_DEBUG="true";
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-07-18 16:21:45 +00:00
|
|
|
babel
|
|
|
|
certifi
|
|
|
|
python-dateutil
|
2023-02-22 10:55:15 +00:00
|
|
|
fasttext-predict
|
2022-07-18 16:21:45 +00:00
|
|
|
flask
|
2023-02-09 11:40:11 +00:00
|
|
|
flask-babel
|
2022-07-18 16:21:45 +00:00
|
|
|
brotli
|
|
|
|
jinja2
|
|
|
|
lxml
|
|
|
|
pygments
|
|
|
|
pyyaml
|
|
|
|
redis
|
|
|
|
uvloop
|
|
|
|
setproctitle
|
|
|
|
httpx
|
|
|
|
httpx-socks
|
|
|
|
markdown-it-py
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ httpx.optional-dependencies.http2
|
|
|
|
++ httpx-socks.optional-dependencies.asyncio;
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
# tests try to connect to network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Create a symlink for easier access to static data
|
|
|
|
mkdir -p $out/share
|
|
|
|
ln -s ../${python3.sitePackages}/searx/static $out/share/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/searxng/searxng";
|
|
|
|
description = "A fork of Searx, a privacy-respecting, hackable metasearch engine";
|
|
|
|
license = licenses.agpl3Plus;
|
2023-02-22 10:55:15 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
}
|