[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64551: closed ([PATCH] svn-download: Use download-nar.)
From: |
GNU bug Tracking System |
Subject: |
bug#64551: closed ([PATCH] svn-download: Use download-nar.) |
Date: |
Tue, 11 Jul 2023 08:39:02 +0000 |
Your message dated Tue, 11 Jul 2023 09:34:28 +0100
with message-id <87cz0y4zdh.fsf@cbaines.net>
and subject line Re: [bug#64551] [PATCH] svn-download: Use download-nar.
has caused the debbugs.gnu.org bug report #64551,
regarding [PATCH] svn-download: Use download-nar.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)
--
64551: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64551
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message ---
Subject: |
[PATCH] svn-download: Use download-nar. |
Date: |
Mon, 10 Jul 2023 10:20:54 +0100 |
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 @@ (define-module (guix svn-download)
#: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 @@ (define* (svn-fetch ref hash-algo hash
"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
base-commit: 9c164d72b2bbdb1823befb32bede82f6af431750
prerequisite-patch-id: 08325c0c53413d75ee6dbb363626fd11858a2960
--
2.41.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#64551] [PATCH] svn-download: Use download-nar. |
Date: |
Tue, 11 Jul 2023 09:34:28 +0100 |
User-agent: |
mu4e 1.10.2; emacs 28.2 |
Ludovic Courtès <ludo@gnu.org> writes:
> Hi!
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> This should help if there are issues fetching from the source repository.
>>
>> * guix/svn-download.scm (svn-fetch): Use download-nar and adjust accordingly.
>
> […]
>
>> + (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)
>
> “;for (guix build download-nar)” rather.
I copied this comment from (guix git-download), and I think it makes
sense. There shouldn't be any need from (guix build download-nar) to
have guile-json and guile-gnutls, it even specifically avoids using
https for this reason.
I think why these extra inputs is indeed just to import (guix swh as
it's required by (guix build download).
> Otherwise LGTM, thanks!
Great, I've pushed this to tex-team-next now as I'm hoping this will
help fix ci.guix.gnu.org building tex-team-next.
signature.asc
Description: PGP signature
--- End Message ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#64551: closed ([PATCH] svn-download: Use download-nar.),
GNU bug Tracking System <=