guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: weechat: Enable documentation and man-pages.


From: guix-commits
Subject: 02/02: gnu: weechat: Enable documentation and man-pages.
Date: Fri, 17 Dec 2021 08:10:04 -0500 (EST)

raghavgururajan pushed a commit to branch master
in repository guix.

commit 50489e39417eae6487083bb1912b814f0467ee8d
Author: Raghav Gururajan <rg@raghavgururajan.name>
AuthorDate: Fri Dec 17 08:04:57 2021 -0500

    gnu: weechat: Enable documentation and man-pages.
    
    * gnu/packages/irc.scm (weechat)[outputs](doc): New output.
    [configure-flags](ENABLE_MAN,ENABLE_DOC): New flags.
    [phases](move-doc): New phase.
    [native-inputs]: Add ruby-asciidoctor.
---
 gnu/packages/irc.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index dee9577..278b1bc 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -195,9 +195,11 @@ SILC and ICB protocols via plugins.")
                (base32
                 "1pyb1yaw61cbdg1g4cc22px1wsh8wm0gsx1yzp684idyz25apzna"))))
     (build-system cmake-build-system)
+    (outputs '("out" "doc"))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("pkg-config" ,pkg-config)
+       ("ruby-asciidoctor" ,ruby-asciidoctor)
        ;; For tests.
        ("cpputest" ,cpputest)))
     (inputs
@@ -217,7 +219,19 @@ SILC and ICB protocols via plugins.")
     (arguments
      `(#:configure-flags
        (list "-DENABLE_PHP=OFF"
+             "-DENABLE_MAN=ON"
+             "-DENABLE_DOC=ON"
              "-DENABLE_TESTS=ON")       ; ‘make test’ fails otherwise
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc"))
+                   (from (string-append out "/share/doc/weechat"))
+                   (to (string-append doc "/share/doc/weechat")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file from to)))))
        ;; Tests hang indefinitely on non-Intel platforms.
        #:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
                                                       (%current-system)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]