about summary refs log tree commit diff
path: root/pkgs/servers/web-apps/searx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/web-apps/searx/default.nix')
-rw-r--r--pkgs/servers/web-apps/searx/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/servers/web-apps/searx/default.nix b/pkgs/servers/web-apps/searx/default.nix
index b56e430d9951..41654a2f0bd9 100644
--- a/pkgs/servers/web-apps/searx/default.nix
+++ b/pkgs/servers/web-apps/searx/default.nix
@@ -1,8 +1,8 @@
-{ lib, python3Packages, fetchFromGitHub, fetchpatch }:
+{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }:
 
 with python3Packages;
 
-buildPythonApplication rec {
+toPythonModule (buildPythonApplication rec {
   pname = "searx";
   version = "0.17.0";
 
@@ -34,10 +34,18 @@ buildPythonApplication rec {
     rm tests/test_robot.py # A variable that is imported is commented out
   '';
 
+  postInstall = ''
+    # Create a symlink for easier access to static data
+    mkdir -p $out/share
+    ln -s ../${python3.sitePackages}/searx/static $out/share/
+  '';
+
+  passthru.tests = { inherit (nixosTests) searx; };
+
   meta = with lib; {
     homepage = "https://github.com/asciimoo/searx";
     description = "A privacy-respecting, hackable metasearch engine";
     license = licenses.agpl3Plus;
     maintainers = with maintainers; [ matejc fpletz globin danielfullmer ];
   };
-}
+})