lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #258813 from SuperSandro2000/drop-searx

searx: drop

authored by

Weijia Wang and committed by
GitHub
c3a3b38c 1cdfe7f5

+9 -126
+8 -25
nixos/modules/services/networking/searx.nix
··· 43 43 [ "services" "searx" "settingsFile" ]) 44 44 ]; 45 45 46 - ###### interface 47 - 48 46 options = { 49 - 50 47 services.searx = { 51 - 52 48 enable = mkOption { 53 49 type = types.bool; 54 50 default = false; ··· 149 145 150 146 package = mkOption { 151 147 type = types.package; 152 - default = pkgs.searx; 153 - defaultText = literalExpression "pkgs.searx"; 148 + default = pkgs.searxng; 149 + defaultText = literalExpression "pkgs.searxng"; 154 150 description = lib.mdDoc "searx package to use."; 155 151 }; 156 152 ··· 190 186 191 187 }; 192 188 193 - 194 - ###### implementation 195 - 196 189 config = mkIf cfg.enable { 197 - assertions = [ 198 - { 199 - assertion = (cfg.limiterSettings != { }) -> cfg.package.pname == "searxng"; 200 - message = "services.searx.limiterSettings requires services.searx.package to be searxng."; 201 - } 202 - { 203 - assertion = cfg.redisCreateLocally -> cfg.package.pname == "searxng"; 204 - message = "services.searx.redisCreateLocally requires services.searx.package to be searxng."; 205 - } 206 - ]; 207 - 208 190 environment.systemPackages = [ cfg.package ]; 209 191 210 192 users.users.searx = ··· 245 227 }; 246 228 }; 247 229 248 - systemd.services.uwsgi = mkIf (cfg.runInUwsgi) 249 - { requires = [ "searx-init.service" ]; 250 - after = [ "searx-init.service" ]; 251 - }; 230 + systemd.services.uwsgi = mkIf cfg.runInUwsgi { 231 + requires = [ "searx-init.service" ]; 232 + after = [ "searx-init.service" ]; 233 + }; 252 234 253 235 services.searx.settings = { 254 236 # merge NixOS settings with defaults settings.yml ··· 256 238 redis.url = lib.mkIf cfg.redisCreateLocally "unix://${config.services.redis.servers.searx.unixSocket}"; 257 239 }; 258 240 259 - services.uwsgi = mkIf (cfg.runInUwsgi) { 241 + services.uwsgi = mkIf cfg.runInUwsgi { 260 242 enable = true; 261 243 plugins = [ "python3" ]; 262 244 ··· 270 252 enable-threads = true; 271 253 module = "searx.webapp"; 272 254 env = [ 255 + # TODO: drop this as it is only required for searx 273 256 "SEARX_SETTINGS_PATH=${cfg.settingsFile}" 274 257 # searxng compatibility https://github.com/searxng/searxng/issues/1519 275 258 "SEARXNG_SETTINGS_PATH=${cfg.settingsFile}"
-72
pkgs/servers/web-apps/searx/default.nix
··· 1 - { lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }: 2 - 3 - with python3Packages; 4 - 5 - toPythonModule (buildPythonApplication rec { 6 - pname = "searx"; 7 - version = "1.1.0"; 8 - 9 - # pypi doesn't receive updates 10 - src = fetchFromGitHub { 11 - owner = "searx"; 12 - repo = "searx"; 13 - rev = "v${version}"; 14 - sha256 = "sha256-+Wsg1k/h41luk5aVfSn11/lGv8hZYVvpHLbbYHfsExw="; 15 - }; 16 - 17 - patches = [ 18 - ./fix-flask-babel-3.0.patch 19 - ]; 20 - 21 - postPatch = '' 22 - sed -i 's/==.*$//' requirements.txt 23 - ''; 24 - 25 - preBuild = '' 26 - export SEARX_DEBUG="true"; 27 - ''; 28 - 29 - propagatedBuildInputs = [ 30 - babel 31 - certifi 32 - python-dateutil 33 - flask 34 - flask-babel 35 - gevent 36 - grequests 37 - jinja2 38 - langdetect 39 - lxml 40 - ndg-httpsclient 41 - pyasn1 42 - pyasn1-modules 43 - pygments 44 - pysocks 45 - pytz 46 - pyyaml 47 - requests 48 - speaklater 49 - setproctitle 50 - werkzeug 51 - ]; 52 - 53 - # tests try to connect to network 54 - doCheck = false; 55 - 56 - pythonImportsCheck = [ "searx" ]; 57 - 58 - postInstall = '' 59 - # Create a symlink for easier access to static data 60 - mkdir -p $out/share 61 - ln -s ../${python3.sitePackages}/searx/static $out/share/ 62 - ''; 63 - 64 - passthru.tests = { inherit (nixosTests) searx; }; 65 - 66 - meta = with lib; { 67 - homepage = "https://github.com/searx/searx"; 68 - description = "A privacy-respecting, hackable metasearch engine"; 69 - license = licenses.agpl3Plus; 70 - maintainers = with maintainers; [ matejc globin danielfullmer ]; 71 - }; 72 - })
-27
pkgs/servers/web-apps/searx/fix-flask-babel-3.0.patch
··· 1 - commit 38b3a4f70e3226a091c53300659752c595b120f9 2 - Author: rnhmjoj <rnhmjoj@inventati.org> 3 - Date: Fri Jun 30 21:48:35 2023 +0200 4 - 5 - Fix for flask-babel 3.0 6 - 7 - diff --git a/searx/webapp.py b/searx/webapp.py 8 - index 2027e72d..f3174a45 100755 9 - --- a/searx/webapp.py 10 - +++ b/searx/webapp.py 11 - @@ -167,7 +167,7 @@ _flask_babel_get_translations = flask_babel.get_translations 12 - def _get_translations(): 13 - if has_request_context() and request.form.get('use-translation') == 'oc': 14 - babel_ext = flask_babel.current_app.extensions['babel'] 15 - - return Translations.load(next(babel_ext.translation_directories), 'oc') 16 - + return Translations.load(babel_ext.translation_directories[0], 'oc') 17 - 18 - return _flask_babel_get_translations() 19 - 20 - @@ -188,7 +188,6 @@ def _get_browser_or_settings_language(request, lang_list): 21 - return settings['search']['default_lang'] or 'en' 22 - 23 - 24 - -@babel.localeselector 25 - def get_locale(): 26 - if 'locale' in request.form\ 27 - and request.form['locale'] in settings['locales']:
+1
pkgs/top-level/aliases.nix
··· 781 781 sane-backends-git = sane-backends; # Added 2021-02-19 782 782 scantailor = scantailor-advanced; # Added 2022-05-26 783 783 sdlmame = throw "'sdlmame' has been renamed to/replaced by 'mame'"; # Converted to throw 2023-09-10 784 + searx = throw "'searx' has been removed as it is unmaintained. Please switch to searxng"; # Added 2023-10-03 784 785 session-desktop-appimage = session-desktop; 785 786 sequoia = sequoia-sq; # Added 2023-06-26 786 787 sexp = sexpp; # Added 2023-07-03
-2
pkgs/top-level/all-packages.nix
··· 27380 27380 27381 27381 rss-bridge = callPackage ../servers/web-apps/rss-bridge { }; 27382 27382 27383 - searx = callPackage ../servers/web-apps/searx { }; 27384 - 27385 27383 selfoss = callPackage ../servers/web-apps/selfoss { }; 27386 27384 27387 27385 shaarli = callPackage ../servers/web-apps/shaarli { };