mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-23 02:36:40 +01:00
svn-download: Use download-nar in svn-multi-fetch.
This should help if there are issues fetching from the source repository. * guix/svn-download.scm (svn-multi-fetch): Use download-nar and adjust accordingly.
This commit is contained in:
parent
a8d937d1bb
commit
32e48b8b43
1 changed files with 43 additions and 26 deletions
|
@ -160,33 +160,50 @@ (define* (svn-multi-fetch ref hash-algo hash
|
||||||
"Return a fixed-output derivation that fetches REF, a <svn-multi-reference>
|
"Return a fixed-output derivation that fetches REF, a <svn-multi-reference>
|
||||||
object. The output is expected to have recursive hash HASH of type
|
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."
|
HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
||||||
(define build
|
|
||||||
(with-imported-modules '((guix build svn)
|
|
||||||
(guix build utils))
|
|
||||||
#~(begin
|
|
||||||
(use-modules (guix build svn)
|
|
||||||
(guix build utils)
|
|
||||||
(srfi srfi-1)
|
|
||||||
(ice-9 match))
|
|
||||||
|
|
||||||
(for-each (lambda (location)
|
(define guile-json
|
||||||
;; The directory must exist if we are to fetch only a
|
(module-ref (resolve-interface '(gnu packages guile)) 'guile-json-4))
|
||||||
;; single file.
|
|
||||||
(unless (string-suffix? "/" location)
|
(define guile-lzlib
|
||||||
(mkdir-p (string-append #$output "/" (dirname location))))
|
(module-ref (resolve-interface '(gnu packages guile)) 'guile-lzlib))
|
||||||
(svn-fetch (string-append (getenv "svn url") "/" location)
|
|
||||||
(string->number (getenv "svn revision"))
|
(define guile-gnutls
|
||||||
(if (string-suffix? "/" location)
|
(module-ref (resolve-interface '(gnu packages tls)) 'guile-gnutls))
|
||||||
(string-append #$output "/" location)
|
|
||||||
(string-append #$output "/" (dirname location)))
|
(define build
|
||||||
#:svn-command #+(file-append svn "/bin/svn")
|
(with-imported-modules
|
||||||
#:recursive? (match (getenv "svn recursive?")
|
(source-module-closure '((guix build svn)
|
||||||
("yes" #t)
|
(guix build download-nar)
|
||||||
(_ #f))
|
(guix build utils)))
|
||||||
#:user-name (getenv "svn user name")
|
(with-extensions (list guile-json guile-gnutls ;for (guix swh)
|
||||||
#:password (getenv "svn password")))
|
guile-lzlib)
|
||||||
(call-with-input-string (getenv "svn locations")
|
#~(begin
|
||||||
read)))))
|
(use-modules (guix build svn)
|
||||||
|
(guix build utils)
|
||||||
|
(guix build download-nar)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(ice-9 match))
|
||||||
|
|
||||||
|
(or (every
|
||||||
|
(lambda (location)
|
||||||
|
;; The directory must exist if we are to fetch only a
|
||||||
|
;; single file.
|
||||||
|
(unless (string-suffix? "/" location)
|
||||||
|
(mkdir-p (string-append #$output "/" (dirname location))))
|
||||||
|
(svn-fetch (string-append (getenv "svn url") "/" location)
|
||||||
|
(string->number (getenv "svn revision"))
|
||||||
|
(if (string-suffix? "/" location)
|
||||||
|
(string-append #$output "/" location)
|
||||||
|
(string-append #$output "/" (dirname location)))
|
||||||
|
#: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")))
|
||||||
|
(call-with-input-string (getenv "svn locations")
|
||||||
|
read))
|
||||||
|
(download-nar #$output))))))
|
||||||
|
|
||||||
(mlet %store-monad ((guile (package->derivation guile system)))
|
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||||
(gexp->derivation (or name "svn-checkout") build
|
(gexp->derivation (or name "svn-checkout") build
|
||||||
|
|
Loading…
Reference in a new issue