gnu: cmake: Fix cross-compilation.
* gnu/packages/cmake.scm (cmake-minimal-cross): New package. * guix/build-system/cmake.scm (default-cmake): Add new target argument and use it to select cmake-minimal or cmake-minimal-cross. (lower): Pass target to default-cmake.
This commit is contained in:
parent
bdcdd55000
commit
534537e2ef
|
@ -219,6 +219,14 @@ (define-public cmake/fixed
|
|||
(append (search-patches "cmake-curl-certificates.patch")
|
||||
(origin-patches (package-source cmake))))))))
|
||||
|
||||
(define-public cmake-minimal-cross
|
||||
(package
|
||||
(inherit cmake-minimal)
|
||||
(name "cmake-minimal-cross")
|
||||
(native-search-paths '())
|
||||
(search-paths
|
||||
(package-native-search-paths cmake-minimal))))
|
||||
|
||||
(define-public emacs-cmake-mode
|
||||
(package
|
||||
(inherit cmake)
|
||||
|
|
|
@ -43,16 +43,19 @@ (define %cmake-build-system-modules
|
|||
`((guix build cmake-build-system)
|
||||
,@%gnu-build-system-modules))
|
||||
|
||||
(define (default-cmake)
|
||||
(define (default-cmake target)
|
||||
"Return the default CMake package."
|
||||
|
||||
;; Do not use `@' to avoid introducing circular dependencies.
|
||||
(let ((module (resolve-interface '(gnu packages cmake))))
|
||||
(module-ref module 'cmake-minimal)))
|
||||
(module-ref module
|
||||
(if target
|
||||
'cmake-minimal-cross
|
||||
'cmake-minimal))))
|
||||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(cmake (default-cmake))
|
||||
(cmake (default-cmake target))
|
||||
#:allow-other-keys
|
||||
#:rest arguments)
|
||||
"Return a bag for NAME."
|
||||
|
|
Loading…
Reference in a new issue