depot/packages/web-apps/searxng/default.nix

56 lines
987 B
Nix
Raw Normal View History

{ lib, nixosTests, python3, python3Packages, npins, pins }:
2022-05-24 20:38:07 +03:00
with python3Packages;
2022-09-02 00:05:39 +03:00
toPythonModule (buildPythonApplication {
2022-05-24 20:38:07 +03:00
pname = "searxng";
2022-05-26 22:39:50 +03:00
version = "1.0.0pre_${builtins.substring 0 7 pins.searxng.revision}";
src = npins.mkSource pins.searxng;
2022-05-24 20:38:07 +03:00
postPatch = ''
2022-12-18 20:35:34 +02:00
sed -i \
-e 's/==.*$//' \
2023-01-09 00:26:40 +02:00
-e 's/fasttext-predict/fasttext/g' \
2022-12-18 20:35:34 +02:00
requirements.txt
2022-05-24 20:38:07 +03:00
'';
preBuild = ''
export SEARX_DEBUG="true";
'';
propagatedBuildInputs = [
Babel
certifi
python-dateutil
flask
flaskbabel
brotli
jinja2
langdetect
lxml
h2
pygments
pyyaml
redis
uvloop
setproctitle
httpx
httpx-socks
markdown-it-py
2022-12-18 20:35:34 +02:00
fasttext
pybind11
2022-05-24 20:38:07 +03:00
];
# tests try to connect to network
doCheck = false;
pythonImportsCheck = [ "searx" ];
postInstall = ''
# Create a symlink for easier access to static data
mkdir -p $out/share
ln -s ../${python3.sitePackages}/searx/static $out/share/
'';
})