From 3fdff9acf898749e83ce6fd4111234db38230775 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 19 Jun 2024 06:44:42 +0200 Subject: [PATCH] searxng: reformat with `nixfmt-rfc-style` --- pkgs/by-name/se/searxng/package.nix | 157 +++++++++++++++------------- 1 file changed, 84 insertions(+), 73 deletions(-) diff --git a/pkgs/by-name/se/searxng/package.nix b/pkgs/by-name/se/searxng/package.nix index 7bca3ca181a7..bc347fb4966e 100644 --- a/pkgs/by-name/se/searxng/package.nix +++ b/pkgs/by-name/se/searxng/package.nix @@ -1,84 +1,95 @@ -{ lib -, python3 -, fetchFromGitHub +{ + lib, + python3, + fetchFromGitHub, }: -python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec { - pname = "searxng"; - version = "0-unstable-2024-05-31"; +python3.pkgs.toPythonModule ( + python3.pkgs.buildPythonApplication rec { + pname = "searxng"; + version = "0-unstable-2024-05-31"; - src = fetchFromGitHub { - owner = "searxng"; - repo = "searxng"; - rev = "18fb701be225560b3fb1011cc533f785823f26a4"; - hash = "sha256-okE/Uxl7YqcM99kLJ4KAlMQi50x5m0bPfYp5bv62WEw="; - }; + src = fetchFromGitHub { + owner = "searxng"; + repo = "searxng"; + rev = "18fb701be225560b3fb1011cc533f785823f26a4"; + hash = "sha256-okE/Uxl7YqcM99kLJ4KAlMQi50x5m0bPfYp5bv62WEw="; + }; - postPatch = '' - sed -i 's/==.*$//' requirements.txt + postPatch = '' + sed -i 's/==.*$//' requirements.txt - # can't be fetchpatched as it is essentially empty and it complains about that - # TODO: drop when updating to a version that includes https://github.com/searxng/searxng/pull/3563 - touch searx/answerers/random/__init__.py - touch searx/answerers/statistics/__init__.py - ''; - - preBuild = - let - versionString = lib.concatStringsSep "." (builtins.tail (lib.splitString "-" (lib.removePrefix "0-" version))); - commitAbbrev = builtins.substring 0 8 src.rev; - in - '' - export SEARX_DEBUG="true"; - - cat > searx/version_frozen.py < searx/version_frozen.py <