GNU bug report logs -
#64551
[PATCH] svn-download: Use download-nar.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Mon, 10 Jul 2023 09:22:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64551 in the body.
You can then email your comments to 64551 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
mail <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, rekado <at> elephly.net, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
:
bug#64551
; Package
guix-patches
.
(Mon, 10 Jul 2023 09:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
mail <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, rekado <at> elephly.net, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
.
(Mon, 10 Jul 2023 09:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64551
; Package
guix-patches
.
(Mon, 10 Jul 2023 21:49:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 64551 <at> debbugs.gnu.org (full text, mbox):
Hi!
Christopher Baines <mail <at> 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.
Otherwise LGTM, thanks!
Ludo’.
Reply sent
to
Christopher Baines <mail <at> cbaines.net>
:
You have taken responsibility.
(Tue, 11 Jul 2023 08:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Baines <mail <at> cbaines.net>
:
bug acknowledged by developer.
(Tue, 11 Jul 2023 08:39:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 64551-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi!
>
> Christopher Baines <mail <at> 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 (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Aug 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.