diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-12-16 13:39:48 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-12-28 16:03:20 -0500 |
commit | 0d4587d65fe1ad0d9357a6d9f776bc7d17391b8e (patch) | |
tree | 099d88ae35177f85a0a544ee40730b7180db1f83 /gnu/packages/bootloaders.scm | |
parent | fde5af3962c8fafc5d20e5d742cc7aea907f3563 (diff) | |
download | guix-0d4587d65fe1ad0d9357a6d9f776bc7d17391b8e.tar.gz guix-0d4587d65fe1ad0d9357a6d9f776bc7d17391b8e.zip |
gnu: Add u-boot-documentation.
* gnu/packages/patches/u-boot-infodocs-target.patch: New patch.
* gnu/local.mk: (dist_patch_DATA): Register it.
* gnu/packages/bootloaders.scm (u-boot): Apply it.
(u-boot-documentation): New variable.
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r-- | gnu/packages/bootloaders.scm | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 89f051f337..a0d1bb279e 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> ;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de> +;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages sdl) + #:use-module (gnu packages sphinx) #:use-module (gnu packages serialization) #:use-module (gnu packages swig) #:use-module (gnu packages valgrind) @@ -638,7 +640,8 @@ tree binary files. These are board description files used by Linux and BSD.") (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt - %u-boot-rk3399-enable-emmc-phy-patch)) + %u-boot-rk3399-enable-emmc-phy-patch + (search-patch "u-boot-infodocs-target.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -669,6 +672,42 @@ tree binary files. These are board description files used by Linux and BSD.") also initializes the boards (RAM etc).") (license license:gpl2+))) +;;; This is very similar to the linux-libre-documentation package, since it +;;; reuses the same Makefile-based build system. +(define-public u-boot-documentation + (package + (inherit u-boot) + (name "u-boot-documentation") + (arguments + (list + #:make-flags #~(list "HOSTCC=gcc" + ;; Avoid treating Sphinx warnings as errors. + "SPHINXOPTS=") + #:tests? #f + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "infodocs" make-flags))) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (let* ((info-dir (string-append #$output "/share/info")) + (info (string-append info-dir + "/DasUBoot.info.gz"))) + (with-directory-excursion "doc/output" + (apply invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" info-dir) + make-flags)))))))) + (native-inputs + (modify-inputs (package-native-inputs u-boot) + (append fontconfig + python-sphinx + texinfo + which))) + (synopsis "U-Boot documentation") + (description "This package provides the documentation for U-Boot, as an +Info manual."))) + (define-public u-boot-tools (package (inherit u-boot) |