From 30df21fe965fce403bb7950b1e1ef97759f4699c Mon Sep 17 00:00:00 2001 From: Adam Massmann Date: Sat, 31 Mar 2018 13:19:48 -0400 Subject: [PATCH 3/3] gnu: Add xapers. --- gnu/packages/search.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index a71981992..ebd084c88 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -26,6 +26,8 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) + #:use-module (gnu packages python-web) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages check) @@ -34,7 +36,8 @@ #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages web) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (gnu packages pdf)) (define-public xapian (package @@ -307,4 +310,56 @@ can quickly and easily index directories of files or remote web sites and search the generated indexes.") (license gpl2+))) ;with exception +(define-public xapers + (package + (name "xapers") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://finestructure.net/xapers/releases/xapers-" + version ".tar.gz")) + (sha256 + (base32 + "0ykz6hn3qj46w3c99d6q0pi5ncq2894simcl7vapv047zm3cylmd")))) + (build-system python-build-system) + (propagated-inputs + `(("python-urwid" ,python-urwid))) + (inputs + `(("poppler" ,poppler) + ("python" ,python) + ("python-xapian-bindings" ,python-xapian-bindings) + ("python-pycurl" ,python-pycurl) + ("python-latexcodec" ,python-latexcodec) + ("python-pybtex" ,python-pybtex) + ("python-pyyaml" ,python-pyyaml) + ("python-six" ,python-six))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after + 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1"))) + (mkdir-p bin) + (mkdir-p man1) + (copy-file "man/man1/xapers.1" + (string-append man1 "/xapers.1")) + (copy-file "man/man1/xapers-adder.1" + (string-append man1 "/xapers-adder.1")) + (copy-file "bin/xapers-adder" + (string-append bin "/xapers-adder")))))))) + (home-page "https://finestructure.net/xapers/") + (synopsis "Personal document indexing system") + (description + "Xapers is a personal document indexing system, +geared towards academic journal articles build on the Xapian search engine. +Think of it as your own personal document search engine, or a local cache of +online libraries. It provides fast search of document text and +bibliographic data and simple document and bibtex retrieval.") + (license gpl3+))) + ;;; search.scm ends here -- 2.11.0