diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2024-02-29 14:19:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 14:19:51 +0100 |
commit | 11b122ec7080e627b36304fbae407875b63b0a45 (patch) | |
tree | 7376047e0f7d588b8676f7e170a86e48881b9b3a | |
parent | 9485bf9f5a76022a8ef84bf1a9da27fd5cede248 (diff) | |
parent | 603c5af51927b04fede367b5edc03d7f3fea0d85 (diff) |
Merge pull request #292185 from dotlambda/searxng-mainProgram
searxng: set meta.mainProgram
-rw-r--r-- | nixos/modules/services/networking/searx.nix | 2 | ||||
-rw-r--r-- | nixos/tests/searx.nix | 6 | ||||
-rw-r--r-- | pkgs/by-name/se/searxng/package.nix | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/searx.nix b/nixos/modules/services/networking/searx.nix index 938d585e31793..5bbf875f0d57b 100644 --- a/nixos/modules/services/networking/searx.nix +++ b/nixos/modules/services/networking/searx.nix @@ -213,7 +213,7 @@ in serviceConfig = { User = "searx"; Group = "searx"; - ExecStart = "${cfg.package}/bin/searx-run"; + ExecStart = lib.getExe cfg.package; } // optionalAttrs (cfg.environmentFile != null) { EnvironmentFile = builtins.toPath cfg.environmentFile; }; environment = { diff --git a/nixos/tests/searx.nix b/nixos/tests/searx.nix index 2f808cb65266e..02a88f690db78 100644 --- a/nixos/tests/searx.nix +++ b/nixos/tests/searx.nix @@ -36,7 +36,7 @@ import ./make-test-python.nix ({ pkgs, ...} : }; # fancy setup: run in uWSGI and use nginx as proxy - nodes.fancy = { ... }: { + nodes.fancy = { config, ... }: { imports = [ ../modules/profiles/minimal.nix ]; services.searx = { @@ -65,7 +65,7 @@ import ./make-test-python.nix ({ pkgs, ...} : include ${pkgs.nginx}/conf/uwsgi_params; uwsgi_pass unix:/run/searx/uwsgi.sock; ''; - locations."/searx/static/".alias = "${pkgs.searx}/share/static/"; + locations."/searx/static/".alias = "${config.services.searx.package}/share/static/"; }; # allow nginx access to the searx socket @@ -108,7 +108,7 @@ import ./make-test-python.nix ({ pkgs, ...} : "${pkgs.curl}/bin/curl --fail http://localhost/searx >&2" ) fancy.succeed( - "${pkgs.curl}/bin/curl --fail http://localhost/searx/static/themes/oscar/js/bootstrap.min.js >&2" + "${pkgs.curl}/bin/curl --fail http://localhost/searx/static/themes/simple/js/leaflet.js >&2" ) ''; }) diff --git a/pkgs/by-name/se/searxng/package.nix b/pkgs/by-name/se/searxng/package.nix index c0d6cd63036d7..6f541d8a3b38f 100644 --- a/pkgs/by-name/se/searxng/package.nix +++ b/pkgs/by-name/se/searxng/package.nix @@ -73,6 +73,7 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec { homepage = "https://github.com/searxng/searxng"; description = "A fork of Searx, a privacy-respecting, hackable metasearch engine"; license = licenses.agpl3Plus; + mainProgram = "searxng-run"; maintainers = with maintainers; [ SuperSandro2000 _999eagle ]; }; }) |