mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
build-system/go: Use gccgo when go isn't supported.
* guix/build-system/go.scm (default-gccgo): New variable. (lower): Only use default-go when it is supported. Change-Id: I30564d97703344df582accaf741f4fcd159b6be1
This commit is contained in:
parent
f093eecbbc
commit
84fbfa82af
1 changed files with 9 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||
;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -114,12 +114,19 @@ (define (default-go)
|
|||
(let ((go (resolve-interface '(gnu packages golang))))
|
||||
(module-ref go 'go)))
|
||||
|
||||
(define (default-gccgo)
|
||||
;; Lazily resolve the binding to avoid a circular dependency.
|
||||
(let ((gcc (resolve-interface '(gnu packages gcc))))
|
||||
(module-ref gcc 'gccgo-12)))
|
||||
|
||||
(define (make-go-std)
|
||||
(module-ref (resolve-interface '(gnu packages golang)) 'make-go-std))
|
||||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(go (default-go))
|
||||
(go (if (supported-package? (default-go))
|
||||
(default-go)
|
||||
(default-gccgo)))
|
||||
#:allow-other-keys
|
||||
#:rest arguments)
|
||||
"Return a bag for NAME."
|
||||
|
|
Loading…
Reference in a new issue