gnu: linux-libre: Do not call 'configuration-file' on non-Linux targets.
Starting from commit b55310603f
, a command
like:
guix build linux-libre -s i586-gnu -n
would crash on a wrong-type-arg error in 'kernel-config' because it was
getting #f as the 'arch' argument. This commit fixes it.
* gnu/packages/linux.scm (make-linux-libre*)[inputs]: Check whether
'platform-linux-architecture' returns #f, as is the case for example on
i586-gnu, before calling CONFIGURATION-FILE.
master
parent
d90bd5642a
commit
2262ee2c63
|
@ -793,12 +793,14 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
|
|||
("mpfr" ,mpfr)
|
||||
("mpc" ,mpc)
|
||||
|
||||
,@(match (and configuration-file
|
||||
(configuration-file
|
||||
(platform-linux-architecture
|
||||
,@(match (let ((arch (platform-linux-architecture
|
||||
(lookup-platform-by-target-or-system
|
||||
(or (%current-target-system) (%current-system))))
|
||||
#:variant (version-major+minor version)))
|
||||
(or (%current-target-system)
|
||||
(%current-system))))))
|
||||
(and configuration-file arch
|
||||
(configuration-file
|
||||
arch
|
||||
#:variant (version-major+minor version))))
|
||||
(#f ;no config for this platform
|
||||
'())
|
||||
((? string? config)
|
||||
|
|
Reference in New Issue