mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
pull: Build with an ABI-compatible Guile.
Fixes <https://bugs.gnu.org/29570>. Reported by Vagrant Cascadian <vagrant@debian.org>. * build-aux/build-self.scm (matching-guile-2.2): New procedure. (guile-for-build): Use it.
This commit is contained in:
parent
28faa40c40
commit
66f217b43a
1 changed files with 19 additions and 2 deletions
|
@ -120,13 +120,30 @@ (define (date-version-string)
|
||||||
;; XXX: Replace with a Git commit id.
|
;; XXX: Replace with a Git commit id.
|
||||||
(date->string (current-date 0) "~Y~m~d.~H"))
|
(date->string (current-date 0) "~Y~m~d.~H"))
|
||||||
|
|
||||||
|
(define (matching-guile-2.2)
|
||||||
|
"Return a Guile 2.2 with the same version as the current one or immediately
|
||||||
|
older than then current one. This is so that we do not build ABI-incompatible
|
||||||
|
objects. See <https://bugs.gnu.org/29570>."
|
||||||
|
(let loop ((packages (find-packages-by-name "guile" "2.2"))
|
||||||
|
(best #f))
|
||||||
|
(match packages
|
||||||
|
(()
|
||||||
|
best)
|
||||||
|
((head tail ...)
|
||||||
|
(if (string=? (package-version head) (version))
|
||||||
|
head
|
||||||
|
(if best
|
||||||
|
(if (version>? (package-version head) (version))
|
||||||
|
(loop tail best)
|
||||||
|
(loop tail head))
|
||||||
|
(loop tail head)))))))
|
||||||
|
|
||||||
(define (guile-for-build)
|
(define (guile-for-build)
|
||||||
"Return a derivation for Guile 2.0 or 2.2, whichever matches the currently
|
"Return a derivation for Guile 2.0 or 2.2, whichever matches the currently
|
||||||
running Guile."
|
running Guile."
|
||||||
(package->derivation (cond-expand
|
(package->derivation (cond-expand
|
||||||
(guile-2.2
|
(guile-2.2
|
||||||
(canonical-package
|
(canonical-package (matching-guile-2.2)))
|
||||||
(specification->package "guile@2.2")))
|
|
||||||
(else
|
(else
|
||||||
(canonical-package
|
(canonical-package
|
||||||
(specification->package "guile@2.0"))))))
|
(specification->package "guile@2.0"))))))
|
||||||
|
|
Loading…
Reference in a new issue