gnu: grub: Normalize indentation.
* gnu/packages/bootloaders.scm (grub): Re-indent package and remove trailing #t.
This commit is contained in:
parent
a3f638e748
commit
1a1a5aad2c
1 changed files with 76 additions and 79 deletions
|
@ -93,22 +93,22 @@
|
||||||
(name "grub")
|
(name "grub")
|
||||||
(version "2.06")
|
(version "2.06")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
|
(uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp"))
|
"1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp"))
|
||||||
(patches (search-patches
|
(patches (search-patches
|
||||||
"grub-efi-fat-serial-number.patch"
|
"grub-efi-fat-serial-number.patch"
|
||||||
"grub-setup-root.patch"))
|
"grub-setup-root.patch"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
;; Adjust QEMU invocation to not use a deprecated device
|
;; Adjust QEMU invocation to not use a deprecated device
|
||||||
;; name that was removed in QEMU 6.0. Remove for >2.06.
|
;; name that was removed in QEMU 6.0. Remove for >2.06.
|
||||||
(substitute* "tests/ahci_test.in"
|
(substitute* "tests/ahci_test.in"
|
||||||
(("ide-drive")
|
(("ide-drive")
|
||||||
"ide-hd"))))))
|
"ide-hd"))))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
|
@ -118,65 +118,62 @@
|
||||||
(list "PYTHON=true")
|
(list "PYTHON=true")
|
||||||
;; Grub fails to load modules stripped with --strip-unneeded.
|
;; Grub fails to load modules stripped with --strip-unneeded.
|
||||||
#:strip-flags '("--strip-debug" "--enable-deterministic-archives")
|
#:strip-flags '("--strip-debug" "--enable-deterministic-archives")
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(add-after 'unpack 'patch-stuff
|
(modify-phases %standard-phases
|
||||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
(add-after 'unpack 'patch-stuff
|
||||||
(substitute* "grub-core/Makefile.in"
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
||||||
(("/bin/sh") (which "sh")))
|
(substitute* "grub-core/Makefile.in"
|
||||||
|
(("/bin/sh") (which "sh")))
|
||||||
|
|
||||||
;; Give the absolute file name of 'mdadm', used to
|
;; Give the absolute file name of 'mdadm', used to determine the
|
||||||
;; determine the root file system when it's a RAID
|
;; root file system when it's a RAID device. Failing to do that,
|
||||||
;; device. Failing to do that, 'grub-probe' silently
|
;; 'grub-probe' silently fails if 'mdadm' is not in $PATH.
|
||||||
;; fails if 'mdadm' is not in $PATH.
|
(when (assoc-ref inputs "mdadm")
|
||||||
(when (assoc-ref inputs "mdadm")
|
(substitute* "grub-core/osdep/linux/getroot.c"
|
||||||
(substitute* "grub-core/osdep/linux/getroot.c"
|
(("argv\\[0\\] = \"mdadm\"")
|
||||||
(("argv\\[0\\] = \"mdadm\"")
|
(string-append "argv[0] = \""
|
||||||
(string-append "argv[0] = \""
|
(assoc-ref inputs "mdadm")
|
||||||
(assoc-ref inputs "mdadm")
|
"/sbin/mdadm\""))))
|
||||||
"/sbin/mdadm\""))))
|
|
||||||
|
|
||||||
;; Make the font visible.
|
;; Make the font visible.
|
||||||
(copy-file (assoc-ref (or native-inputs inputs)
|
(copy-file (assoc-ref (or native-inputs inputs)
|
||||||
"unifont")
|
"unifont")
|
||||||
"unifont.bdf.gz")
|
"unifont.bdf.gz")
|
||||||
(system* "gunzip" "unifont.bdf.gz")
|
(system* "gunzip" "unifont.bdf.gz")
|
||||||
|
|
||||||
;; Give the absolute file name of 'ckbcomp'.
|
;; Give the absolute file name of 'ckbcomp'.
|
||||||
(substitute* "util/grub-kbdcomp.in"
|
(substitute* "util/grub-kbdcomp.in"
|
||||||
(("^ckbcomp ")
|
(("^ckbcomp ")
|
||||||
(string-append
|
(string-append
|
||||||
(search-input-file inputs "/bin/ckbcomp")
|
(search-input-file inputs "/bin/ckbcomp")
|
||||||
" ")))))
|
" ")))))
|
||||||
(add-after 'unpack 'set-freetype-variables
|
(add-after 'unpack 'set-freetype-variables
|
||||||
;; These variables need to be set to the native versions
|
;; These variables need to be set to the native versions of the
|
||||||
;; of the dependencies because they are used to build
|
;; dependencies because they are used to build programs which are
|
||||||
;; programs which are executed during build time.
|
;; executed during build time.
|
||||||
(lambda* (#:key native-inputs #:allow-other-keys)
|
(lambda* (#:key native-inputs #:allow-other-keys)
|
||||||
(when (assoc-ref native-inputs "freetype")
|
(when (assoc-ref native-inputs "freetype")
|
||||||
(let ((freetype (assoc-ref native-inputs "freetype")))
|
(let ((freetype (assoc-ref native-inputs "freetype")))
|
||||||
(setenv "BUILD_FREETYPE_LIBS"
|
(setenv "BUILD_FREETYPE_LIBS"
|
||||||
(string-append "-L" freetype
|
(string-append "-L" freetype
|
||||||
"/lib -lfreetype"))
|
"/lib -lfreetype"))
|
||||||
(setenv "BUILD_FREETYPE_CFLAGS"
|
(setenv "BUILD_FREETYPE_CFLAGS"
|
||||||
(string-append "-I" freetype
|
(string-append "-I" freetype
|
||||||
"/include/freetype2"))))
|
"/include/freetype2"))))))
|
||||||
#t))
|
(add-before 'check 'disable-flaky-test
|
||||||
(add-before 'check 'disable-flaky-test
|
(lambda _
|
||||||
(lambda _
|
;; This test is unreliable. For more information, see:
|
||||||
;; This test is unreliable. For more information, see:
|
;; <https://bugs.gnu.org/26936>.
|
||||||
;; <https://bugs.gnu.org/26936>.
|
(substitute* "Makefile.in"
|
||||||
(substitute* "Makefile.in"
|
(("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
|
||||||
(("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
|
"grub_cmd_date grub_cmd_sleep"))))
|
||||||
"grub_cmd_date grub_cmd_sleep"))
|
(add-before 'check 'disable-pixel-perfect-test
|
||||||
#t))
|
(lambda _
|
||||||
(add-before 'check 'disable-pixel-perfect-test
|
;; This test compares many screenshots rendered with an older
|
||||||
(lambda _
|
;; Unifont (9.0.06) than that packaged in Guix.
|
||||||
;; This test compares many screenshots rendered with an
|
(substitute* "Makefile.in"
|
||||||
;; older Unifont (9.0.06) than that packaged in Guix.
|
(("test_unset grub_func_test")
|
||||||
(substitute* "Makefile.in"
|
"test_unset")))))
|
||||||
(("test_unset grub_func_test")
|
|
||||||
"test_unset"))
|
|
||||||
#t)))
|
|
||||||
;; Disable tests on ARM and AARCH64 platforms or when cross-compiling.
|
;; Disable tests on ARM and AARCH64 platforms or when cross-compiling.
|
||||||
#:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system)
|
#:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system)
|
||||||
(%current-system)))
|
(%current-system)))
|
||||||
|
@ -223,19 +220,19 @@
|
||||||
("flex" ,flex)
|
("flex" ,flex)
|
||||||
("texinfo" ,texinfo)
|
("texinfo" ,texinfo)
|
||||||
("help2man" ,help2man)
|
("help2man" ,help2man)
|
||||||
("freetype" ,freetype) ; native version needed for build-grub-mkfont
|
("freetype" ,freetype) ;native version needed for build-grub-mkfont
|
||||||
|
|
||||||
;; XXX: When building GRUB 2.02 on 32-bit x86, we need a binutils
|
;; XXX: When building GRUB 2.02 on 32-bit x86, we need a binutils
|
||||||
;; capable of assembling 64-bit instructions. However, our default
|
;; capable of assembling 64-bit instructions. However, our default
|
||||||
;; binutils on 32-bit x86 is not 64-bit capable.
|
;; binutils on 32-bit x86 is not 64-bit capable.
|
||||||
,@(if (string-match "^i[3456]86-" (%current-system))
|
,@(if (string-match "^i[3456]86-" (%current-system))
|
||||||
(let ((binutils (package/inherit
|
(let ((binutils (package/inherit
|
||||||
binutils
|
binutils
|
||||||
(name "binutils-i386")
|
(name "binutils-i386")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments binutils)
|
(substitute-keyword-arguments (package-arguments binutils)
|
||||||
((#:configure-flags flags ''())
|
((#:configure-flags flags ''())
|
||||||
`(cons "--enable-64-bit-bfd" ,flags)))))))
|
`(cons "--enable-64-bit-bfd" ,flags)))))))
|
||||||
`(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper-i386"
|
`(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper-i386"
|
||||||
#:binutils binutils))
|
#:binutils binutils))
|
||||||
("binutils" ,binutils)))
|
("binutils" ,binutils)))
|
||||||
|
|
Reference in a new issue