2022-07-25 12:58:20 +03:00
|
|
|
{ lib, nixosTests, python3, python3Packages, npins, pins }:
|
2022-05-24 20:38:07 +03:00
|
|
|
|
|
|
|
with python3Packages;
|
|
|
|
|
|
|
|
toPythonModule (buildPythonApplication rec {
|
|
|
|
pname = "searxng";
|
2022-05-26 22:39:50 +03:00
|
|
|
version = "1.0.0pre_${builtins.substring 0 7 pins.searxng.revision}";
|
|
|
|
|
2022-07-25 12:58:20 +03:00
|
|
|
src = npins.mkSource pins.searxng;
|
2022-05-24 20:38:07 +03:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/==.*$//' requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
# 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/
|
|
|
|
'';
|
|
|
|
})
|