From 5752d0b1c14a57fbda0a37e4c9b9777ca9499dba Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Apr 2021 12:45:51 +0200 Subject: [PATCH 1/2] searx: 0.18.0 -> 1.0.0 --- pkgs/servers/web-apps/searx/default.nix | 42 ++++++++++++++++--------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/web-apps/searx/default.nix b/pkgs/servers/web-apps/searx/default.nix index bb9944ea3772..43fb374fe117 100644 --- a/pkgs/servers/web-apps/searx/default.nix +++ b/pkgs/servers/web-apps/searx/default.nix @@ -1,23 +1,21 @@ -{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }: +{ lib, nixosTests, python3, python3Packages, fetchFromGitHub }: with python3Packages; toPythonModule (buildPythonApplication rec { pname = "searx"; - version = "0.18.0"; + version = "1.0.0"; - # Can not use PyPI because certain test files are missing. + # pypi doesn't receive updates src = fetchFromGitHub { owner = "searx"; repo = "searx"; rev = "v${version}"; - sha256 = "0idxspvckvsd02v42h4z4wqrfkn1l8n59i91f7pc837cxya8p6hn"; + sha256 = "0ghkx8g8jnh8yd46p4mlbjn2zm12nx27v7qflr4c8xhlgi0px0mh"; }; postPatch = '' sed -i 's/==.*$//' requirements.txt - # skip failing test - sed -i '/test_json_serial(/,+3d' tests/unit/test_standalone_searx.py ''; preBuild = '' @@ -25,16 +23,32 @@ toPythonModule (buildPythonApplication rec { ''; propagatedBuildInputs = [ - pyyaml lxml grequests flaskbabel flask requests - gevent speaklater Babel pytz dateutil pygments - pyasn1 pyasn1-modules ndg-httpsclient certifi pysocks - jinja2 werkzeug + Babel + certifi + dateutil + flask + flaskbabel + gevent + grequests + jinja2 + langdetect + lxml + ndg-httpsclient + pyasn1 + pyasn1-modules + pygments + pysocks + pytz + pyyaml + requests + speaklater + werkzeug ]; - checkInputs = [ - Babel mock nose2 covCore pep8 plone-testing splinter - unittest2 zope_testrunner selenium - ]; + # tests try to connect to network + doCheck = false; + + pythonImportsCheck = [ "searx" ]; postInstall = '' # Create a symlink for easier access to static data From d0d77ec032d31fb22076325b018b60bbe0dc8177 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 19 Apr 2021 00:09:55 +0200 Subject: [PATCH 2/2] nixos/tests/searx: fix for 1.0 update --- nixos/tests/searx.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/searx.nix b/nixos/tests/searx.nix index 7c28eea30d20..2f808cb65266 100644 --- a/nixos/tests/searx.nix +++ b/nixos/tests/searx.nix @@ -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/js/bootstrap.min.js >&2" + "${pkgs.curl}/bin/curl --fail http://localhost/searx/static/themes/oscar/js/bootstrap.min.js >&2" ) ''; })