summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2022-03-19 22:39:33 +0000
committerLudovic Courtès <ludo@gnu.org>2022-03-21 23:03:35 +0100
commite584a093f943be216fdc93895281fde835836b8d (patch)
treed40db45d78fa137322cf8b80d13c57e48dde196b /guix
parentfbbb006986db81db6529613b1e0ddb8286acc0e1 (diff)
packages: Fix time-travel from Guix 1.1.0 / Guile < 2.2.7.
* guix/packages.scm: Only set #:replace? #true when Guile is >= 2.2.7. Fixes: <https://issues.guix.gnu.org/53765> Reported-By: Peter Kois <kangus@gmail.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/packages.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 288ae37523..1c63eb2d3e 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -182,8 +183,16 @@
;; The 'source-module-closure' procedure ca. 1.2.0 did not recognize
;; #:re-export-and-replace: <https://issues.guix.gnu.org/52694>.
-;; Work around it.
-(module-re-export! (current-module) '(delete) #:replace? #t)
+;; Work around it. The #:replace? argument is only supported by
+;; Guile 2.2.7 and later, work-around it if necessary to allow
+;; time-travel from 1.1.0, see <https://issues.guix.gnu.org/53765>.
+(let ((major (string->number (major-version))))
+ (if (or (>= major 3)
+ (and (= major 2)
+ (= (string->number (minor-version)) 2) ; there is no Guile 2.3.X
+ (>= (string->number (micro-version)) 7)))
+ (module-re-export! (current-module) '(delete) #:replace? #t)
+ (module-re-export! (current-module) '(delete))))
;;; Commentary:
;;;