mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
129f033b07
commit
a8d937d1bb
1 changed files with 32 additions and 15 deletions
|
@ -23,6 +23,7 @@
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
|
#:use-module (guix modules)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module ((guix build svn) #:prefix build:)
|
#:use-module ((guix build svn) #:prefix build:)
|
||||||
|
@ -79,22 +80,38 @@
|
||||||
"Return a fixed-output derivation that fetches REF, a <svn-reference>
|
"Return a fixed-output derivation that fetches REF, a <svn-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)
|
|
||||||
(ice-9 match))
|
|
||||||
|
|
||||||
(svn-fetch (getenv "svn url")
|
(define guile-json
|
||||||
(string->number (getenv "svn revision"))
|
(module-ref (resolve-interface '(gnu packages guile)) 'guile-json-4))
|
||||||
#$output
|
|
||||||
#:svn-command #+(file-append svn "/bin/svn")
|
(define guile-lzlib
|
||||||
#:recursive? (match (getenv "svn recursive?")
|
(module-ref (resolve-interface '(gnu packages guile)) 'guile-lzlib))
|
||||||
("yes" #t)
|
|
||||||
(_ #f))
|
(define guile-gnutls
|
||||||
#:user-name (getenv "svn user name")
|
(module-ref (resolve-interface '(gnu packages tls)) 'guile-gnutls))
|
||||||
#:password (getenv "svn password")))))
|
|
||||||
|
(define build
|
||||||
|
(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))
|
||||||
|
|
||||||
|
(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)))
|
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||||
(gexp->derivation (or name "svn-checkout") build
|
(gexp->derivation (or name "svn-checkout") build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue