gnu: grub: Only do code substitution when input is available.
* gnu/packages/bootloaders.scm (grub)[arguments]: In custom 'patch-stuff phase only substitute the absolute location of the mdadm binary when it is an input.
This commit is contained in:
parent
8c287bb2fb
commit
149666dfef
1 changed files with 7 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
||||||
;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
|
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
|
||||||
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2019 nee <nee@cock.li>
|
;;; Copyright © 2019 nee <nee@cock.li>
|
||||||
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
|
@ -115,11 +115,12 @@
|
||||||
;; determine the root file system when it's a RAID
|
;; determine the root file system when it's a RAID
|
||||||
;; device. Failing to do that, 'grub-probe' silently
|
;; device. Failing to do that, 'grub-probe' silently
|
||||||
;; fails if 'mdadm' is not in $PATH.
|
;; fails if 'mdadm' is not in $PATH.
|
||||||
(substitute* "grub-core/osdep/linux/getroot.c"
|
(when (assoc-ref inputs "mdadm")
|
||||||
(("argv\\[0\\] = \"mdadm\"")
|
(substitute* "grub-core/osdep/linux/getroot.c"
|
||||||
(string-append "argv[0] = \""
|
(("argv\\[0\\] = \"mdadm\"")
|
||||||
(assoc-ref inputs "mdadm")
|
(string-append "argv[0] = \""
|
||||||
"/sbin/mdadm\"")))
|
(assoc-ref inputs "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)
|
||||||
|
|
Reference in a new issue