guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36653] [PATCH] guix import stackage: default to a LTS release compa


From: Robert Vollmert
Subject: [bug#36653] [PATCH] guix import stackage: default to a LTS release compatible with GHC 8.4
Date: Sun, 14 Jul 2019 21:38:43 +0200

In particular, this means that guix lint won't warn to update to
versions that won't necessarily fit our package set well.

Also some minor clean-up tweaks.

* guix/import/stackage.scm (%stackage-url): Change to https, avoiding
redirect log messages.
(%default-lts-version): New field.
(stackage->guix-package, latest-lts-release): Use it.
(lts-info-ghc-version): Remove unused function.
(lts-info-packages, latest-lts-release): Fix documentation typos.
---
 guix/import/stackage.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 1c1e73a723..de12ae4cb9 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -39,15 +39,13 @@
 ;;; Stackage info fetcher and access functions
 ;;;
 
-(define %stackage-url "http://www.stackage.org";)
+(define %stackage-url "https://www.stackage.org";)
 
-(define (lts-info-ghc-version lts-info)
-  "Retruns the version of the GHC compiler contained in LTS-INFO."
-  (and=> (assoc-ref lts-info "snapshot")
-         (cut assoc-ref <> "ghc")))
+;;; Latest LTS version compatible with bundled ghc version.
+(define %default-lts-version "12.26")
 
 (define (lts-info-packages lts-info)
-  "Retruns the alist of packages contained in LTS-INFO."
+  "Returns the alist of packages contained in LTS-INFO."
   (or (assoc-ref lts-info "packages") '()))
 
 (define (leave-with-message fmt . args)
@@ -90,7 +88,7 @@
    (lambda* (package-name ; upstream name
              #:key
              (include-test-dependencies? #t)
-             (lts-version "")
+             (lts-version %default-lts-version)
              (packages-info
               (lts-info-packages
                (stackage-lts-info-fetch lts-version))))
@@ -119,10 +117,12 @@ included in the Stackage LTS release."
 ;;;
 
 (define latest-lts-release
-  (let ((pkgs-info (mlambda () (lts-info-packages (stackage-lts-info-fetch)))))
+  (let ((pkgs-info
+        (mlambda () (lts-info-packages
+                     (stackage-lts-info-fetch %default-lts-version)))))
     (lambda* (package)
       "Return an <upstream-source> for the latest Stackage LTS release of
-PACKAGE or #f it the package is not inlucded in the Stackage LTS release."
+PACKAGE or #f it the package is not included in the Stackage LTS release."
       (let* ((hackage-name (guix-package->hackage-name package))
              (version (lts-package-version (pkgs-info) hackage-name))
              (name-version (hackage-name-version hackage-name version)))
-- 
2.20.1 (Apple Git-117)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]