diff mbox series

[bug#70460,v2,2/3] gnu: power-profiles-daemon: Build gtk-docs.

Message ID 96f7ba672aea10b1c259bba52d0536b3ce87aa38.1714662236.git.dariqq@posteo.net
State New
Headers show
Series Update power-profiles-daemon and add a service-type for it. | expand

Commit Message

Dariqq May 2, 2024, 3:37 p.m. UTC
* gnu/packages/freedesktop.scm (power-profiles-daemon):
[outputs]: Add docs output.
[#:configure-flags]: Enable building gtk-docs.
[#:phases]: Add a phase to move gtk-docs to docs output.
[inputs]: Add gtk-doc/stable, libxslt for docs.

Change-Id: I1bc6047858d2b5188e714f39da8b760bc6a71078
---
 gnu/packages/freedesktop.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 53cae544aa..a77dab5794 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1169,9 +1169,11 @@  (define-public power-profiles-daemon
         (base32
          "0dn3ygv49q7mzs52ch3yphxf4hbry698r1ajj52f6jgw7mpwr5p4"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
      (list #:configure-flags #~(list "-Dsystemdsystemunitdir="
                                      "-Dpylint=disabled"
+                                     "-Dgtk_doc=true"
                                      (string-append "-Dzshcomp=" #$output
                                                     "/share/zsh/site-functions/"))
            #:phases
@@ -1189,9 +1191,17 @@  (define-public power-profiles-daemon
                                               "/lib/python"
                                               #$(version-major+minor
                                                  (package-version (this-package-input "python")))
-                                              "/site-packages")))))))))
+                                              "/site-packages"))))))
+               (add-after 'install 'move-docs
+                 (lambda _
+                   (mkdir-p (string-append #$output:doc "/share"))
+                   (rename-file
+                    (string-append #$output "/share/gtk-doc")
+                    (string-append #$output:doc "/share/gtk-doc")))))))
     (native-inputs
      (list `(,glib "bin")
+           gtk-doc/stable
+           libxslt
            pkg-config
            python
            python-argparse-manpage