Subject: [PATCH] gnu: direnv: Install manpages

From: Dion Mendel <[email-masked]>
Date: Sun, 25 Apr 2021 19:43:08 +0800

Hi guix,

The direnv package has manpages in the source repository, yet none are 
currently installed.  This patch installs the manpages.

The patch was tested by installing and running direnv locally and 
viewing the manpages with man-db.
>From 87fbd9f5d183b1912db186e7c5879566267655b8 Mon Sep 17 00:00:00 2001
From: Dion Mendel <[email-masked]>
Date: Sun, 25 Apr 2021 18:57:21 +0800
Subject: [PATCH] gnu: direnv: Install manpages

* gnu/packages/shellutils.scm (direnv): Install manpages.
---
 gnu/packages/shellutils.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index c7a941dfa6..ec887e40fd 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -254,6 +254,17 @@ are already there.")
              ;; so delete the extra source code here.
              (delete-file-recursively "src/github.com/direnv/direnv/vendor")
              #t))
+         (add-after 'install 'install-manpages
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man/man1")))
+               (mkdir-p man)
+               (with-directory-excursion "src/github.com/direnv/direnv"
+                 (install-file "man/direnv.1" man)
+                 (install-file "man/direnv-stdlib.1" man)
+                 (install-file "man/direnv.toml.1" man)
+               )
+               #t)))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-- 
2.31.1