Skip to content

Commit

Permalink
searxng: downgrade httpx to fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored and bachp committed Feb 11, 2025
1 parent e65f980 commit 3c2e5ab
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions pkgs/by-name/se/searxng/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,38 @@
fetchFromGitHub,
nixosTests,
}:
let
python = python3.override {
packageOverrides = final: prev: {
httpx = prev.httpx.overridePythonAttrs (old: rec {
version = "0.27.2";
src = old.src.override {
tag = version;
hash = "sha256-N0ztVA/KMui9kKIovmOfNTwwrdvSimmNkSvvC+3gpck=";
};
});

python3.pkgs.toPythonModule (
python3.pkgs.buildPythonApplication rec {
httpx-socks = prev.httpx-socks.overridePythonAttrs (old: rec {
version = "0.9.2";
src = old.src.override {
tag = "v${version}";
hash = "sha256-PUiciSuDCO4r49st6ye5xPLCyvYMKfZY+yHAkp5j3ZI=";
};
});

starlette = prev.starlette.overridePythonAttrs (old: {
disabledTests = old.disabledTests or [ ] ++ [
# fails in assertion with spacing issue
"test_request_body"
"test_request_stream"
"test_wsgi_post"
];
});
};
};
in
python.pkgs.toPythonModule (
python.pkgs.buildPythonApplication rec {
pname = "searxng";
version = "0-unstable-2025-01-10";

Expand Down Expand Up @@ -41,7 +70,7 @@ python3.pkgs.toPythonModule (
'';

dependencies =
with python3.pkgs;
with python.pkgs;
[
babel
brotli
Expand Down Expand Up @@ -73,10 +102,10 @@ python3.pkgs.toPythonModule (
postInstall = ''
# Create a symlink for easier access to static data
mkdir -p $out/share
ln -s ../${python3.sitePackages}/searx/static $out/share/
ln -s ../${python.sitePackages}/searx/static $out/share/
# copy config schema for the limiter
cp searx/limiter.toml $out/${python3.sitePackages}/searx/limiter.toml
cp searx/limiter.toml $out/${python.sitePackages}/searx/limiter.toml
'';

passthru = {
Expand Down

0 comments on commit 3c2e5ab

Please sign in to comment.