unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39445] [PATCH] gnu: ripgrep: Install the manpage.
@ 2020-02-05 21:36 Jakub Kądziołka
  2020-02-09 21:51 ` [bug#39445] [PATCH v2 1/2] " Jakub Kądziołka
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kądziołka @ 2020-02-05 21:36 UTC (permalink / raw)
  To: 39445

* gnu/packages/rust-apps.scm (ripgrep)[native-inputs]: Add ASCIIDOC to
  compile the manpage.
  (ripgrep)[arguments]: Add phase: 'install-manpage. Add #:modules
  argument to import (ice-9 match).
---
 gnu/packages/rust-apps.scm | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 90bd146442..b73efc08d9 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
   #:use-module (guix packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crates-io)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control))
@@ -58,7 +60,24 @@
        (("rust-clap" ,rust-clap-2)
         ("rust-lazy-static" ,rust-lazy-static-1.3)
         ("rust-serde" ,rust-serde-1.0)
-        ("rust-serde-derive" ,rust-serde-derive-1.0))))
+        ("rust-serde-derive" ,rust-serde-derive-1.0))
+       #:modules ((ice-9 match)
+                  (guix build cargo-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'install-manpage
+           ;; NOTE: This is done before 'check so that there's only one output
+           ;; directory with the man page.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (match (find-files "target" "^rg\\.1$")
+               ((manpage)
+                (install-file manpage (string-append
+                                        (assoc-ref outputs "out")
+                                        "/share/man/man1"))))
+             #t)))))
+    (native-inputs
+     `(("asciidoc" ,asciidoc)))
     (home-page "https://github.com/BurntSushi/ripgrep")
     (synopsis "Line-oriented search tool")
     (description
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-11 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 21:36 [bug#39445] [PATCH] gnu: ripgrep: Install the manpage Jakub Kądziołka
2020-02-09 21:51 ` [bug#39445] [PATCH v2 1/2] " Jakub Kądziołka
2020-02-09 21:51   ` [bug#39445] [PATCH v2 2/2] gnu: ripgrep: enable the 'pcre2' feature Jakub Kądziołka
2020-02-10  8:43     ` Efraim Flashner
2020-02-10 11:28       ` Jakub Kądziołka
2020-02-11 18:25         ` bug#39445: " Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).