diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-11-08 12:26:24 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-11-08 21:22:35 +0200 |
commit | 149666dfefdbe643940b22a18e0c622f5246dc3e (patch) | |
tree | aa337b93637fe6a43fbdc51de22070f0c92a3574 /gnu/packages | |
parent | 8c287bb2fb169c6b47c14cf2b7f7e5c06e2682db (diff) | |
download | guix-149666dfefdbe643940b22a18e0c622f5246dc3e.tar.gz |
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.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/bootloaders.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 7034085d67..e3e49288ad 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org> ;;; 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 © 2019 nee <nee@cock.li> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> @@ -115,11 +115,12 @@ ;; determine the root file system when it's a RAID ;; device. Failing to do that, 'grub-probe' silently ;; fails if 'mdadm' is not in $PATH. - (substitute* "grub-core/osdep/linux/getroot.c" - (("argv\\[0\\] = \"mdadm\"") - (string-append "argv[0] = \"" - (assoc-ref inputs "mdadm") - "/sbin/mdadm\""))) + (when (assoc-ref inputs "mdadm") + (substitute* "grub-core/osdep/linux/getroot.c" + (("argv\\[0\\] = \"mdadm\"") + (string-append "argv[0] = \"" + (assoc-ref inputs "mdadm") + "/sbin/mdadm\"")))) ;; Make the font visible. (copy-file (assoc-ref (or native-inputs inputs) |