This repository has no description
1.5 kB
69 lines
1{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }:
2
3with python3Packages;
4
5toPythonModule (buildPythonApplication rec {
6 pname = "searx";
7 version = "1.0.0";
8
9 # Can not use PyPI because certain test files are missing.
10 src = fetchFromGitHub {
11 owner = "searx";
12 repo = "searx";
13 rev = "v${version}";
14 sha256 = "0ghkx8g8jnh8yd46p4mlbjn2zm12nx27v7qflr4c8xhlgi0px0mh";
15 };
16
17 postPatch = ''
18 sed -i 's/==.*$//' requirements.txt
19 '';
20
21 preBuild = ''
22 export SEARX_DEBUG="true";
23 '';
24
25 propagatedBuildInputs = [
26 Babel
27 certifi
28 dateutil
29 flask
30 flaskbabel
31 gevent
32 grequests
33 jinja2
34 langdetect
35 lxml
36 ndg-httpsclient
37 pyasn1
38 pyasn1-modules
39 pygments
40 pysocks
41 pytz
42 pyyaml
43 requests
44 speaklater
45 werkzeug
46 ];
47
48 # tests try to connect to network
49 doCheck = false;
50 # checkInputs = [
51 # Babel mock nose2 covCore pep8 plone-testing splinter
52 # unittest2 zope_testrunner selenium
53 # ];
54
55 postInstall = ''
56 # Create a symlink for easier access to static data
57 mkdir -p $out/share
58 ln -s ../${python3.sitePackages}/searx/static $out/share/
59 '';
60
61 passthru.tests = { inherit (nixosTests) searx; };
62
63 meta = with lib; {
64 homepage = "https://github.com/searx/searx";
65 description = "A privacy-respecting, hackable metasearch engine";
66 license = licenses.agpl3Plus;
67 maintainers = with maintainers; [ matejc fpletz globin danielfullmer ];
68 };
69})