From e0f415b2b56ed9319fda7f182a91692a36368c40 Mon Sep 17 00:00:00 2001 From: Adam Massmann Date: Sun, 20 May 2018 18:50:03 -0400 Subject: gnu: xapers: Fix recommended packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/search.scm (xapers): [inputs]: remove python, poppler [propagated-inputs]: add poppler, xclip, xdg-utils. [arguments]: modify-phases to disable x-terminal options. Signed-off-by: Ludovic Courtès --- gnu/packages/search.scm | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 02deb5c4ae..5c8539d561 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -32,12 +32,14 @@ #:use-module (gnu packages compression) #:use-module (gnu packages check) #:use-module (gnu packages databases) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages web) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml)) (define-public xapian @@ -326,27 +328,52 @@ search the generated indexes.") "0ykz6hn3qj46w3c99d6q0pi5ncq2894simcl7vapv047zm3cylmd")))) (build-system python-build-system) (propagated-inputs - `(("python-urwid" ,python-urwid))) - (inputs `(("poppler" ,poppler) - ("python" ,python) - ("python-latexcodec" ,python-latexcodec) + ("python-urwid" ,python-urwid) + ("xclip" ,xclip) + ("xdg-utils" ,xdg-utils))) + (inputs + `(("python-latexcodec" ,python-latexcodec) ("python-pybtex" ,python-pybtex) ("python-pycurl" ,python-pycurl) ("python-pyyaml" ,python-pyyaml) ("python-six" ,python-six) ("python-xapian-bindings" ,python-xapian-bindings))) (arguments - `(#:phases + `(#:modules ((ice-9 rdelim) + (guix build python-build-system) + (guix build utils)) + #:phases (modify-phases %standard-phases (add-after 'install 'install-doc (lambda* (#:key inputs outputs #:allow-other-keys) + (define (purge-term-support input output) + (let loop ((line (read-line input))) + (if (string-prefix? "if [[ \"$term\"" line) + (begin (display "eval \"$cmd\"\n" output) + #t) + (begin (display (string-append line "\n") output) + (loop (read-line input)))))) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) + (adder-out (string-append bin "/xapers-adder")) (man1 (string-append out "/share/man/man1"))) (install-file "man/man1/xapers.1" man1) (install-file "man/man1/xapers-adder.1" man1) - (install-file "bin/xapers-adder" bin))))))) + ;; below is equivalent to setting --no-term option + ;; permanently on; this is desirable to avoid imposing + ;; an x-terminal installation on the user but breaks + ;; some potential xapers-adder uses like auto browser + ;; pdf handler, but user could instead still use + ;; e.g. "xterm -e xapers-adder %F" for same use. + ;; alternatively we could propagate xterm as an input + ;; and replace 'x-terminal-emulator' with 'xterm' + (call-with-input-file "bin/xapers-adder" + (lambda (input) + (call-with-output-file adder-out + (lambda (output) + (purge-term-support input output))))) + (chmod adder-out #o555))))))) (home-page "https://finestructure.net/xapers/") (synopsis "Personal document indexing system") (description -- cgit 1.4.1 From d840f6b98ad9f2dbfb0c9b28005d5ef8d69892b7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 1 Apr 2018 07:55:37 +0200 Subject: gnu: xapian: Use INVOKE. * gnu/packages/search.scm (xapian)[arguments]: Substitute INVOKE for SYSTEM*. --- gnu/packages/search.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 5c8539d561..e176fd1aa7 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015, 2016 Eric Bavier ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Adam Massmann ;;; ;;; This file is part of GNU Guix. @@ -64,13 +65,13 @@ ;; getaddrinfo(). This does not work in the build environment, ;; so exclude those tests. See HACKING for the list of targets. (lambda _ - (zero? (system* "make" - "check-inmemory" - "check-remoteprog" - ;"check-remotetcp" - "check-multi" - "check-glass" - "check-chert"))))))) + (invoke "make" + "check-inmemory" + "check-remoteprog" + ;"check-remotetcp" + "check-multi" + "check-glass" + "check-chert")))))) (synopsis "Search Engine Library") (description "Xapian is a highly adaptable toolkit which allows developers to easily -- cgit 1.4.1