{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }: with python3Packages; toPythonModule (buildPythonApplication rec { pname = "searxng"; version = "20220520"; src = fetchFromGitHub { owner = "searxng"; repo = "searxng"; rev = "61535a4c206aa247a6fa87697b70668048086e27"; sha256 = "sha256-Ek/YZ4YzXxA/spmEAgcqItSmsYa/aVTeOBZbFPqNpJ4="; }; 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/ ''; })