Subject: bug#39445: closed (Re: [bug#39445] [PATCH v2 2/2] gnu: ripgrep: enable the 'pcre2' feature)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 11 Feb 2020 18:27:02 +0000

Your bug report

#39445: [PATCH] gnu: ripgrep: Install the manpage.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39445: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39445
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#39445] [PATCH v2 2/2] gnu: ripgrep: enable the 'pcre2' feature
From: Efraim Flashner <[email-masked]>
To: Jakub Kądziołka <[email-masked]>
Cc: [email-masked]
Date: Tue, 11 Feb 2020 20:25:42 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Feb 10, 2020 at 12:28:13PM +0100, Jakub Kądziołka wrote:
> On Mon, Feb 10, 2020 at 10:43:51AM +0200, Efraim Flashner wrote:
> > Should the install phase also get the '--release' flag?
> 
> It's a reasonable question to ask, but no. `cargo install' will always
> use a release build. Moreover, passing the --release flag to cargo
> install will lead to an unexpected argument error.

That's unfortunate. I was hoping to re-use the cargo-build-flags option.
Might still be worth it, after adding logic to strip out the '--release'
flag.

Patches pushed.

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Subject: [PATCH] gnu: ripgrep: Install the manpage.
From: Jakub Kądziołka <[email-masked]>
To: [email-masked]
Date: Wed, 5 Feb 2020 22:36:50 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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 <[email-masked]>
 ;;; Copyright © 2019, 2020 Efraim Flashner <[email-masked]>
+;;; Copyright © 2020 Jakub Kądziołka <[email-masked]>
 ;;;
 ;;; 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