diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-10-29 11:40:04 +0000 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-10-29 11:57:03 +0000 |
commit | 21fcb08d09414a0cd6e2ce3c32ad5a33b22dad38 (patch) | |
tree | f72882b8702cde0d70ec62d82195fdbb052e4b9d | |
parent | ad39268cdf075f4c4eeb87ed78ce46ca6f817675 (diff) | |
download | guix-21fcb08d09414a0cd6e2ce3c32ad5a33b22dad38.tar.gz |
gnu: recoll: Enable GUI and add inputs for common filters.
* gnu/packages/search.scm (recoll)[arguments]: Enable GUI; add build phase 'wrap-filters. [inputs]: Replace python-pdftotext with poppler; add qtbase-5, unzip, gawk, grep, groff, gzip, libiconv, perl, perl-image-exiftool, sed, and tar.
-rw-r--r-- | gnu/packages/search.scm | 67 |
1 files changed, 61 insertions, 6 deletions
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 4640429fa9..14b21e644f 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -43,15 +43,19 @@ #:use-module (gnu packages databases) #:use-module (gnu packages ebook) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gawk) + #:use-module (gnu packages groff) #:use-module (gnu packages less) #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) + #:use-module (gnu packages photo) #: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 qt) #:use-module (gnu packages sphinx) #:use-module (gnu packages time) #:use-module (gnu packages web) @@ -303,17 +307,55 @@ for parsing HTML files.") (build-system gnu-build-system) (arguments `(#:configure-flags - (list "--disable-qtgui" - "--disable-webkit" + (list "--disable-webkit" "--disable-python-module" - "--without-systemd") + "--without-systemd" + (string-append "QMAKEPATH=" (assoc-ref %build-inputs "qtbase") + "/bin/qmake")) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-default-data-dir (lambda* (#:key outputs #:allow-other-keys) (substitute* "python/recoll/recoll/rclconfig.py" (("/opt/local") - (assoc-ref outputs "out")))))))) + (assoc-ref outputs "out"))))) + (add-after 'install 'wrap-filters + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mapping + '(("rclps" + "poppler") + ("rclpdf.py" + "poppler") + ("rclpurple" + "gawk") + ("rcllyx" + "libiconv") + ("rcltex" + "libiconv") + ("rclkwd" + "unzip" "gzip" "tar" "libxslt") + ("rclman" + "groff") + ("rclgaim" + "gawk" "libiconv") + ("rclaptosidman" + "sed") + ("rclscribus" + "grep" "gawk" "sed")))) + (for-each + (lambda (program packages) + (wrap-program (string-append out "/share/recoll/filters/" program) + `("PATH" ":" prefix + ,(map (lambda (i) + (string-append (assoc-ref inputs i) "/bin")) + packages)))) + (map car mapping) + (map cdr mapping)) + + (wrap-program (string-append out "/share/recoll/filters/rclimg") + `("PERL5LIB" ":" prefix + (,(getenv "PERL5LIB")))))))))) (inputs `(("aspell" ,aspell) ("chmlib" ,chmlib) @@ -321,9 +363,22 @@ for parsing HTML files.") ("libxslt" ,libxslt) ("libxml2" ,libxml2) ("python" ,python) - ("python-pdftotext" ,python-pdftotext) + ("qtbase" ,qtbase-5) + ("unzip" ,unzip) ("xapian" ,xapian) - ("zlib" ,zlib))) + ("zlib" ,zlib) + + ;; For filters + ("gawk" ,gawk) + ("grep" ,grep) + ("groff" ,groff) + ("gzip" ,gzip) + ("libiconv" ,libiconv) + ("perl" ,perl) + ("perl-image-exiftool" ,perl-image-exiftool) + ("poppler" ,poppler) + ("sed" ,sed) + ("tar" ,tar))) (native-inputs `(("pkg-config" ,pkg-config) ("which" ,which))) |