diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-11-23 11:34:16 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-11-23 15:43:32 +0200 |
commit | 77b7d990ecff497653a2e5988497c6b00f5d2a37 (patch) | |
tree | 0fdd87d6d9af81f8ebdec807cfce741e4125e456 /gnu/packages/bootloaders.scm | |
parent | d9e57db72479812cfa30ed8e30a6351959f9a2b2 (diff) | |
download | guix-77b7d990ecff497653a2e5988497c6b00f5d2a37.tar.gz |
gnu: grub: Fix cross-compiling for other architectures.
Reported by cbaines and xelxebar on IRC. * gnu/packages/bootloaders.scm (grub)[arguments]: In custom 'set-freetype-variables phase only use the native-inputs version of freetype.
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r-- | gnu/packages/bootloaders.scm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 12bc39322f..2e9709982f 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -138,14 +138,15 @@ ;; These variables need to be set to the native versions ;; of the dependencies because they are used to build ;; programs which are executed during build time. - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (let ((freetype (assoc-ref (or native-inputs inputs) "freetype"))) - (setenv "BUILD_FREETYPE_LIBS" - (string-append "-L" freetype - "/lib -lfreetype")) - (setenv "BUILD_FREETYPE_CFLAGS" - (string-append "-I" freetype - "/include/freetype2"))) + (lambda* (#:key native-inputs #:allow-other-keys) + (when (assoc-ref native-inputs "freetype") + (let ((freetype (assoc-ref native-inputs "freetype"))) + (setenv "BUILD_FREETYPE_LIBS" + (string-append "-L" freetype + "/lib -lfreetype")) + (setenv "BUILD_FREETYPE_CFLAGS" + (string-append "-I" freetype + "/include/freetype2")))) #t)) (add-before 'check 'disable-flaky-test (lambda _ |