diff mbox series

[bug#53878,v7,05/24] gnu: racket-minimal: Don't configure non-existant catalogs.

Message ID 20220227212920.2009000-6-philip@philipmcgrath.com
State New
Headers show
Series Update Racket to 8.4. Adjust Chez Scheme packages. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Philip McGrath Feb. 27, 2022, 9:29 p.m. UTC
* gnu/packages/racket.scm (racket-minimal)[arguments]<#:phases>: Change
'initialize-config.rktd' to only add a release catalog when the package
version is a release version.
---
 gnu/packages/racket.scm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index eb87eaa492..dc392fb27d 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -231,6 +231,15 @@  (define (write-racket-hash alist)
                              (format #t "(~s . ~s)" k v)))
                           alist)
                 (display ")\n"))
+              (define maybe-release-catalog
+                (let ((v #$(package-version this-package)))
+                  (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)"
+                                    v)
+                      `(,(string-append
+                          "https://download.racket-lang.org/releases/"
+                          v
+                          "/catalog/"))
+                      '())))
               (mkdir-p "racket/etc")
               (with-output-to-file "racket/etc/config.rktd"
                 (lambda ()
@@ -239,12 +248,8 @@  (define (write-racket-hash alist)
                       . (#f #$(file-append (this-package-input "openssl") "/lib")
                             #$(file-append (this-package-input "sqlite") "/lib")))
                      (build-stamp . "")
-                     (catalogs
-                      . (,(string-append
-                           "https://download.racket-lang.org/releases/"
-                           #$(package-version this-package)
-                           "/catalog/")
-                         #f))))))))
+                     (catalogs ,@maybe-release-catalog
+                               #f)))))))
           (add-before 'configure 'chdir
             (lambda _
               (chdir "racket/src")))