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.
This commit is contained in:
Maxim Cournoyer 2022-12-01 09:34:54 -05:00
parent ad9d0f8e58
commit 748ec62882
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 12 additions and 4 deletions

View file

@ -816,6 +816,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(version version) (version version)
(source source) (source source)
(supported-systems supported-systems) (supported-systems supported-systems)
(outputs `("out" ,@(if build-doc? '("doc") '())))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list (list
@ -842,10 +843,16 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(invoke "make" "infodocs"))) (invoke "make" "infodocs")))
(add-after 'build-doc 'install-doc (add-after 'build-doc 'install-doc
(lambda _ (lambda _
(with-directory-excursion "Documentation/output" (let* ((info-dir (string-append #$output:doc
(invoke "make" "-C" "texinfo" "install-info" "/share/info"))
(string-append "infodir=" #$output (info (string-append
"/share/info")))))) 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 (add-before 'configure 'set-environment
(lambda* (#:key target #:allow-other-keys) (lambda* (#:key target #:allow-other-keys)

View file

@ -59,6 +59,7 @@
(name (string-append (package-name linux) "-module-builder")) (name (string-append (package-name linux) "-module-builder"))
(inputs (inputs
`(("linux" ,linux))) `(("linux" ,linux)))
(outputs (delete "doc" (package-outputs linux)))
(arguments (arguments
(substitute-keyword-arguments (package-arguments linux) (substitute-keyword-arguments (package-arguments linux)
((#:phases phases) ((#:phases phases)