Skip to content

Commit

Permalink
Merge pull request #301920 from JohnRTitor/backport-searxng-to-23.11
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Apr 12, 2024
2 parents 6cb313b + 1c98511 commit c561445
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/searx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,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 = {
Expand Down
6 changes: 3 additions & 3 deletions nixos/tests/searx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
)
'';
})
15 changes: 8 additions & 7 deletions pkgs/by-name/se/searxng/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec {
pname = "searxng";
version = "unstable-2023-10-31";
version = "0-unstable-2024-03-08";

src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "b05a15540e1dc2dfb8e4e25aa537b2a68e713844";
hash = "sha256-x0PyS+A4KjbBnTpca17Wx3BQjtOHvVuWpusPPc1ULnU=";
owner = "searxng";
repo = "searxng";
rev = "9c08a0cdddae7ceafbe5e00ce94cf7f1d36c97e0";
hash = "sha256-0qlOpJqpOmseIeIafd0NLd2lF5whu18QxmwOua8dKzg=";
};

postPatch = ''
Expand All @@ -20,7 +20,7 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec {

preBuild =
let
versionString = lib.concatStringsSep "." (builtins.tail (lib.splitString "-" version));
versionString = lib.concatStringsSep "." (builtins.tail (lib.splitString "-" (lib.removePrefix "0-" version)));
commitAbbrev = builtins.substring 0 8 src.rev;
in
''
Expand Down Expand Up @@ -66,13 +66,14 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec {
ln -s ../${python3.sitePackages}/searx/static $out/share/
# copy config schema for the limiter
cp searx/botdetection/limiter.toml $out/${python3.sitePackages}/searx/botdetection/limiter.toml
cp searx/limiter.toml $out/${python3.sitePackages}/searx/limiter.toml
'';

meta = with lib; {
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 ];
};
})
4 changes: 2 additions & 2 deletions pkgs/servers/uwsgi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ in

stdenv.mkDerivation (finalAttrs: {
pname = "uwsgi";
version = "2.0.23";
version = "2.0.24";

src = fetchFromGitHub {
owner = "unbit";
repo = "uwsgi";
rev = finalAttrs.version;
hash = "sha256-gyYsgPF6eGa3D7bjmhhVER+uM0yPLfZiwSUzZ2mGcHg=";
hash = "sha256-KVzIp2rKCpF6aXhhu+6nw7q8Pnx/0+HD23mmYmVFPSA=";
};

patches = [
Expand Down

0 comments on commit c561445

Please sign in to comment.