diff --git a/configurations/cluster/modules/searxng/default.nix b/configurations/cluster/modules/searxng/default.nix index 9b9b6e4f..7a0fda4d 100644 --- a/configurations/cluster/modules/searxng/default.nix +++ b/configurations/cluster/modules/searxng/default.nix @@ -9,13 +9,48 @@ in { services.searx = { enable = true; - package = pkgs.searxng.overrideAttrs (o: { - postInstall = '' - ${o.postInstall or ""} - # Replace logo - cp ${./logo.png} $out/${pkgs.python3.sitePackages}/searx/static/themes/simple/img/searxng.png - ''; - }); + package = + (pkgs.searxng.override { + # FIXME: https://github.com/NixOS/nixpkgs/issues/380351 + python3 = pkgs.python3.override { + packageOverrides = pyFinal: pyPrev: { + httpx = pyPrev.httpx.overridePythonAttrs (o: rec { + version = "0.27.2"; + src = pkgs.fetchFromGitHub { + owner = "encode"; + repo = o.pname; + tag = version; + hash = "sha256-N0ztVA/KMui9kKIovmOfNTwwrdvSimmNkSvvC+3gpck="; + }; + }); + starlette = pyPrev.starlette.overridePythonAttrs (o: rec { + version = "0.41.2"; + src = pkgs.fetchFromGitHub { + owner = "encode"; + repo = "starlette"; + tag = version; + hash = "sha256-ZNB4OxzJHlsOie3URbUnZywJbqOZIvzxS/aq7YImdQ0="; + }; + }); + httpx-socks = pyPrev.httpx-socks.overridePythonAttrs (o: rec { + version = "0.9.2"; + src = pkgs.fetchFromGitHub { + owner = "romis2012"; + repo = "httpx-socks"; + tag = "v${version}"; + hash = "sha256-PUiciSuDCO4r49st6ye5xPLCyvYMKfZY+yHAkp5j3ZI="; + }; + }); + }; + }; + }) + .overrideAttrs (o: { + postInstall = '' + ${o.postInstall or ""} + # Replace logo + cp ${./logo.png} $out/${pkgs.python3.sitePackages}/searx/static/themes/simple/img/searxng.png + ''; + }); environmentFile = config.sops.secrets.searxng.path;