guix-commits
[Top][All Lists]
Advanced

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

02/07: import: stackage: Updater resolves inputs lazily.


From: guix-commits
Subject: 02/07: import: stackage: Updater resolves inputs lazily.
Date: Fri, 9 Jun 2023 08:52:49 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit df8b3821a80d3cdf9b2244bad743b4cfba765bb9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 9 11:46:05 2023 +0200

    import: stackage: Updater resolves inputs lazily.
    
    Fixes the "haskell-stackage" test in 'tests/lint.scm', which started
    failing with e6223017d95bc615b2648f0798d9a3904d5b5f57 because the extra
    HTTP GETs induced by the 'haskell-fetch' calls would fail.
    
    * guix/import/stackage.scm (latest-lts-release): Call 'hackage-fetch'
    and its continuation from within 'inputs', which is delayed.  Pass it
    NAME-VERSION instead of HACKAGE-NAME-VERSION.
---
 guix/import/stackage.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index f8b2726591..00814c7d46 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -158,13 +158,14 @@ PACKAGE or #f if the package is not included in the 
Stackage LTS release."
            (warning (G_ "failed to parse ~a~%")
                     (hackage-cabal-url hackage-name))
            #f)
-          (_ (let ((url (hackage-source-url hackage-name version))
-                   (cabal (eval-cabal (hackage-fetch hackage-name) '())))
+          (_ (let ((url (hackage-source-url hackage-name version)))
                (upstream-source
                 (package (package-name pkg))
                 (version version)
                 (urls (list url))
-                (inputs (cabal-package-inputs cabal))))))))))
+                (inputs
+                 (let ((cabal (eval-cabal (hackage-fetch name-version) '())))
+                   (cabal-package-inputs cabal)))))))))))
 
 (define (stackage-lts-package? package)
   "Return whether PACKAGE is available on the default Stackage LTS release."



reply via email to

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