diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-07-24 17:45:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-07-24 18:56:25 +0200 |
commit | e85d7ed60905f059686650c3ab21b42500f09351 (patch) | |
tree | bbc77343e7baace2c88f300c6cb7c01447b555c7 /guix | |
parent | cb3bae900f6c85d4529842bf75f3cca0b4bb1df7 (diff) |
quirks: Adjust patch to allow traveling back to Dec. 2018.
Fixes <https://bugs.gnu.org/42519>.
This fixes:
guix time-machine --commit=897f303d2fa61497a931cf5fcb43349eb5f44c14
a commit dated Dec. 2018.
* guix/quirks.scm (%bug-41214-patch)[accesses-guile-2.2-optimization-options?]:
Add second 'match' clause.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/quirks.scm | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/guix/quirks.scm b/guix/quirks.scm index d292f4e932..1cffe971fc 100644 --- a/guix/quirks.scm +++ b/guix/quirks.scm @@ -139,18 +139,30 @@ corresponds to the given Guix COMMIT, a SHA1 hexadecimal string." (define (accesses-guile-2.2-optimization-options? source commit) (catch 'system-error (lambda () - (match (call-with-input-file - (string-append source "/guix/build/compile.scm") - read) - (('define-module ('guix 'build 'compile) - _ ... - #:use-module ('language 'tree-il 'optimize) - #:use-module ('language 'cps 'optimize) - #:export ('%default-optimizations - '%lightweight-optimizations - 'compile-files)) - #t) - (_ #f))) + (call-with-input-file (string-append source + "/guix/build/compile.scm") + (lambda (port) + (match (read port) + (('define-module ('guix 'build 'compile) + _ ... + #:use-module ('language 'tree-il 'optimize) + #:use-module ('language 'cps 'optimize) + #:export ('%default-optimizations + '%lightweight-optimizations + 'compile-files)) + #t) + (_ + ;; Before v1.0.0 (ca. Dec. 2018), the 'use-modules' form + ;; would show up in a subsequent 'cond-expand' clause. + ;; See <https://bugs.gnu.org/42519>. + (match (read port) + (('cond-expand + ('guile-2.2 ('use-modules ('language 'tree-il 'optimize) + _ ...)) + _ ...) + #t) + (_ + #f))))))) (const #f))) (define (build-with-guile-2.2 source) |