summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-03-25 03:04:01 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-09-05 10:26:12 -0400
commitb19e44d05f5723910ecfe76f9d16dd91e9e78ae0 (patch)
tree1dd4e053beb73ad1f8742af073b1aadfe721f7b9
parent8fb09076bddd1ff8b19fbc38e79ab533b55ac754 (diff)
downloadguix-b19e44d05f5723910ecfe76f9d16dd91e9e78ae0.tar.gz
gnu: glibmm: Enable documentation.
* gnu/packages/glib.scm (glibmm)[outputs]: New output "doc".
[arguments]<#:configure-flags>[-Dbuild-documentation]: New flag.
<#:phases>['move-doc]: New phase.
[native-inputs]: Add doxygen and graphviz.

Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net>
-rw-r--r--gnu/packages/glib.scm21
1 files changed, 18 insertions, 3 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 52f9a802a2..b5f67fec7b 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -646,8 +646,12 @@ by GDBus included in Glib.")
                (base32
                 "0xgkyhb2876mcyyib5rk3ya9aingyj68h02nl22yvkhx35rqbwy1"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       (list
+        "-Dbuild-documentation=true")
+       #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'disable-failing-tests
            (lambda _
@@ -658,9 +662,20 @@ by GDBus included in Glib.")
                ;; This test does a DNS lookup, and then expects to be able
                ;; to open a TLS session; just skip it.
                (("[ \t]*.*giomm_tls_client.*$") ""))
-             #t)))))
+             #t))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))
+               #t))))))
     (native-inputs
-     `(("glib:bin" ,glib "bin")
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("glib:bin" ,glib "bin")
        ("m4" ,m4)
        ("mm-common" ,mm-common)
        ("perl" ,perl)