guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: linux-libre: Move info manual to doc output.


From: guix-commits
Subject: 02/02: gnu: linux-libre: Move info manual to doc output.
Date: Thu, 1 Dec 2022 11:00:18 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 748ec628826cea3faa3679074d87fae9bc810080
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Dec 1 09:34:54 2022 -0500

    gnu: linux-libre: Move info manual to doc output.
    
    The kernel Linux is installed in the system profile, which means the manual
    was not easily discoverable.  Move it to the "doc" output, so that users can
    install the Linux documentation explicitly in their user profile without
    pulling the whole Linux package.
    
    * gnu/packages/linux.scm (make-linux-libre*) [outputs]: Conditionally add a
    "doc" output.
    [phases] {install-doc}: Install the info manual to the doc output, an 
create a
    "linux" symlink to it for convenience.
    * guix/build-system/linux-module.scm (make-linux-module-builder): Delete the
    "doc" output, if present.
---
 gnu/packages/linux.scm             | 15 +++++++++++----
 guix/build-system/linux-module.scm |  1 +
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5dde319361..6d2aa89d35 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -816,6 +816,7 @@ for ARCH and optionally VARIANT, or #f if there is no such 
configuration."
     (version version)
     (source source)
     (supported-systems supported-systems)
+    (outputs `("out" ,@(if build-doc? '("doc") '())))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -842,10 +843,16 @@ for ARCH and optionally VARIANT, or #f if there is no 
such configuration."
                         (invoke "make" "infodocs")))
                     (add-after 'build-doc 'install-doc
                       (lambda _
-                        (with-directory-excursion "Documentation/output"
-                          (invoke "make" "-C" "texinfo" "install-info"
-                                  (string-append "infodir=" #$output
-                                                 "/share/info"))))))
+                        (let* ((info-dir (string-append #$output:doc
+                                                        "/share/info"))
+                               (info (string-append
+                                      info-dir "/TheLinuxKernel.info.gz")))
+                          (with-directory-excursion "Documentation/output"
+                            (invoke "make" "-C" "texinfo" "install-info"
+                                    (string-append "infodir=" info-dir)))
+                          ;; Create a symlink, for convenience.
+                          (symlink info (string-append info-dir
+                                                       "/linux.info.gz"))))))
                  #~())
           (add-before 'configure 'set-environment
             (lambda* (#:key target #:allow-other-keys)
diff --git a/guix/build-system/linux-module.scm 
b/guix/build-system/linux-module.scm
index c1ddeaea10..29c3485023 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -59,6 +59,7 @@
     (name (string-append (package-name linux) "-module-builder"))
     (inputs
      `(("linux" ,linux)))
+    (outputs (delete "doc" (package-outputs linux)))
     (arguments
      (substitute-keyword-arguments (package-arguments linux)
        ((#:phases phases)



reply via email to

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