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.
This commit is contained in:
Efraim Flashner 2020-11-23 11:34:16 +02:00
parent d9e57db724
commit 77b7d990ec
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -138,14 +138,15 @@ (define-public grub
;; 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 _