guix-commits
[Top][All Lists]
Advanced

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

branch tex-team-next updated: svn-download: Use download-nar.


From: guix-commits
Subject: branch tex-team-next updated: svn-download: Use download-nar.
Date: Tue, 11 Jul 2023 04:32:29 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch tex-team-next
in repository guix.

The following commit(s) were added to refs/heads/tex-team-next by this push:
     new b5a4b0ccb9 svn-download: Use download-nar.
b5a4b0ccb9 is described below

commit b5a4b0ccb949c4ca2a7d62c514815728b78fe697
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jul 10 10:18:46 2023 +0100

    svn-download: Use download-nar.
    
    This should help if there are issues fetching from the source repository.
    
    * guix/svn-download.scm (svn-fetch): Use download-nar and adjust 
accordingly.
---
 guix/svn-download.scm | 45 +++++++++++++++++++++++++++++++--------------
 1 file changed, 31 insertions(+), 14 deletions(-)

diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index 769571b5f6..6a53d5d2eb 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -23,6 +23,7 @@
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:use-module (guix monads)
+  #:use-module (guix modules)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module ((guix build svn) #:prefix build:)
@@ -79,22 +80,38 @@
   "Return a fixed-output derivation that fetches REF, a <svn-reference>
 object.  The output is expected to have recursive hash HASH of type
 HASH-ALGO (a symbol).  Use NAME as the file name, or a generic name if #f."
+
+  (define guile-json
+    (module-ref (resolve-interface '(gnu packages guile)) 'guile-json-4))
+
+  (define guile-lzlib
+    (module-ref (resolve-interface '(gnu packages guile)) 'guile-lzlib))
+
+  (define guile-gnutls
+    (module-ref (resolve-interface '(gnu packages tls)) 'guile-gnutls))
+
   (define build
-    (with-imported-modules '((guix build svn)
-                             (guix build utils))
-      #~(begin
-          (use-modules (guix build svn)
-                       (ice-9 match))
+    (with-imported-modules
+        (source-module-closure '((guix build svn)
+                                 (guix build download-nar)
+                                 (guix build utils)))
+      (with-extensions (list guile-json guile-gnutls   ;for (guix swh)
+                             guile-lzlib)
+        #~(begin
+            (use-modules (guix build svn)
+                         (guix build download-nar)
+                         (ice-9 match))
 
-          (svn-fetch (getenv "svn url")
-                     (string->number (getenv "svn revision"))
-                     #$output
-                     #:svn-command #+(file-append svn "/bin/svn")
-                     #:recursive? (match (getenv "svn recursive?")
-                                    ("yes" #t)
-                                    (_ #f))
-                     #:user-name (getenv "svn user name")
-                     #:password (getenv "svn password")))))
+            (or (svn-fetch (getenv "svn url")
+                           (string->number (getenv "svn revision"))
+                           #$output
+                           #:svn-command #+(file-append svn "/bin/svn")
+                           #:recursive? (match (getenv "svn recursive?")
+                                          ("yes" #t)
+                                          (_ #f))
+                           #:user-name (getenv "svn user name")
+                           #:password (getenv "svn password"))
+                (download-nar #$output))))))
 
   (mlet %store-monad ((guile (package->derivation guile system)))
     (gexp->derivation (or name "svn-checkout") build



reply via email to

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