[PATCH 0/2] Add Searx.

DoneSubmitted by Vinicius Monego.
Details
3 participants
  • jgart
  • Ludovic Courtès
  • Vinicius Monego
Owner
unassigned
Severity
normal
V
V
Vinicius Monego wrote on 8 Jul 2021 05:54
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210708035409.20278-1-monego@posteo.net
Vinicius Monego (2):
gnu: Add python-langdetect.
gnu: Add searx.

gnu/packages/python-xyz.scm | 20 ++++++++++++++
gnu/packages/search.scm | 53 ++++++++++++++++++++++++++++++++++++-
2 files changed, 72 insertions(+), 1 deletion(-)

--
2.32.0
V
V
Vinicius Monego wrote on 8 Jul 2021 05:55
[PATCH 1/2] gnu: Add python-langdetect.
(address . 49461@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210708035527.20486-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-langdetect): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e655b3b20e..53d116ddfa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10443,6 +10443,26 @@ your package is installed, via @code{pkg_resources} (part of
 primary use case is APIs defined before keyword-only parameters existed.")
     (license license:gpl3+)))
 
+(define-public python-langdetect
+  (package
+    (name "python-langdetect")
+    (version "1.0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "langdetect" version))
+       (sha256
+        (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (home-page "https://github.com/Mimino666/langdetect")
+    (synopsis "Language detection library")
+    (description
+     "This library is a port of Nakatani Shuyo's language-detection library
+(version from 03/03/2014) to Python.")
+    (license license:expat)))
+
 (define-public python-pyasn1
   (package
     (name "python-pyasn1")
-- 
2.32.0
V
V
Vinicius Monego wrote on 8 Jul 2021 05:55
[PATCH 2/2] gnu: Add searx.
(address . 49461@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210708035527.20486-2-monego@posteo.net
* gnu/packages/search.scm (searx): New variable.
---
gnu/packages/search.scm | 53 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)

Toggle diff (90 lines)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 362eb0d95e..44d5b631ca 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,7 +25,7 @@
 
 (define-module (gnu packages search)
   #:use-module ((guix licenses)
-                #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 x11 perl-license))
+                #:select (gpl2 gpl2+ gpl3+ agpl3+ lgpl2.1+ bsd-3 x11 perl-license))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -43,9 +44,11 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml))
@@ -207,6 +210,54 @@ files and directories.")
 command line tool for interacting with libtocc.")
     (license gpl3+)))
 
+(define-public searx
+  (package
+    (name "searx")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/searx/searx")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ghkx8g8jnh8yd46p4mlbjn2zm12nx27v7qflr4c8xhlgi0px0mh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ;what tests do is make online requests to each engine
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'relax-requirements
+           (lambda _
+             ;; These packages are outdated in Guix at the time of packaging.
+             ;; When they are updated, remove corresponding substitutions.
+             ;; Tests can run after build with 'searx-checker' tool in /bin.
+             (substitute* "requirements.txt"
+               (("flask-babel==2.0.0") "flask-babel>=1.0.0")
+               (("jinja2==2.11.3") "jinja2>=2.11.2")
+               (("lxml==4.6.3") "lxml>=4.4.2")
+               (("pygments==2.8.0") "pygments>=2.7.3")
+               (("requests\\[socks\\]==2.25.1") "requests>=2.25")
+               (("==") ">=")))))))
+    (propagated-inputs
+     `(("python-babel" ,python-babel)
+       ("python-certifi" ,python-certifi)
+       ("python-dateutil" ,python-dateutil)
+       ("python-flask" ,python-flask)
+       ("python-flask-babel" ,python-flask-babel)
+       ("python-idna" ,python-idna)
+       ("python-jinja2" ,python-jinja2)
+       ("python-langdetect" ,python-langdetect)
+       ("python-lxml" ,python-lxml)
+       ("python-pygments" ,python-pygments)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-requests" ,python-requests)))
+    (home-page "https://searx.github.io/searx/")
+    (synopsis "Privacy-respecting metasearch engine")
+    (description "Searx is a privacy-respecting, hackable metasearch engine.")
+    (license agpl3+)))
+
 (define-public bool
   (package
     (name "bool")
-- 
2.32.0
J
J
jgart wrote on 8 Jul 2021 23:01
Thank you! Are you planning to add a service also?
(address . 49461@debbugs.gnu.org)
66e0e6bedd6986b953c818785bb87967@dismail.de
Hi Vinicius,

Thank you for packaging this!

Searx is a package I've been wanting in guix also.

Are you planning to add a service also?

If you'd like to work on a searx-service-type together just let me know.

Some inspiration:


all best,

jgart
L
L
Ludovic Courtès wrote on 19 Jul 2021 19:59
Re: bug#49461: [PATCH 0/2] Add Searx.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 49461-done@debbugs.gnu.org)
87k0lmkww1.fsf@gnu.org
Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (3 lines)
> gnu: Add python-langdetect.
> gnu: Add searx.

Applied, thanks!

It’d be great if you could expound the description of Searx, and I agree
with jgart: a service would be sweet. :-)

Ludo’.
Closed
V
V
Vinicius Monego wrote on 19 Jul 2021 23:20
(address . 49461-done@debbugs.gnu.org)
87fcc66c328ce0c1b3d5983dba38bcab1f68333b.camel@posteo.net
Hi jgart,

Toggle quote (2 lines)
> Are you planning to add a service also?

A Shepherd service? It was not in the plan. I have only used Guix as a
foreign package manager so far. Unless the service can be tested
without conflicting with the host system, then it will be difficult for
me.
Closed
L
L
Ludovic Courtès wrote on 23 Jul 2021 11:00
(name . Vinicius Monego)(address . monego@posteo.net)
87bl6tcsma.fsf@gnu.org
Hi Vinicius,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (7 lines)
>> Are you planning to add a service also?
>
> A Shepherd service? It was not in the plan. I have only used Guix as a
> foreign package manager so far. Unless the service can be tested
> without conflicting with the host system, then it will be difficult for
> me.

Yes, you can test it with ‘guix system vm’ (and run a system test with
“make check-system”¹) even on a foreign distro.

Now, I don’t mean to impose that on you. :-)

Thanks,
Ludo’.

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 49461@debbugs.gnu.org