summaryrefslogtreecommitdiff
path: root/guix/cvs-download.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-08-06 15:00:01 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-08-24 10:41:06 +0200
commite9f8a7e21579fd2833dfca6830e21f886a79a9ca (patch)
tree9d5c2c909f37a65d78c452894195a3a2318bda75 /guix/cvs-download.scm
parentc6872990b51971922f3064cba54ab752fcdc1559 (diff)
downloadguix-patches-e9f8a7e21579fd2833dfca6830e21f886a79a9ca.tar
guix-patches-e9f8a7e21579fd2833dfca6830e21f886a79a9ca.tar.gz
Use guile-zlib extension in build-side code.
* Makefile.am (MODULES): Move guix/build/download-nar.scm to ... (MODULES_NOT_COMPILED): ... here. * guix/build/download-nar.scm: Use (zlib) instead of (guix zlib). * guix/cvs-download.scm (cvs-fetch): Do not stub (guix config) in imported modules list, instead add "guile-zlib" to the extension list. * guix/git-download.scm (git-fetch): Ditto. * guix/hg-download.scm (hg-fetch): Do not stub (guix config) in imported modules list, instead add "guile-zlib" to the extension list.
Diffstat (limited to 'guix/cvs-download.scm')
-rw-r--r--guix/cvs-download.scm39
1 files changed, 15 insertions, 24 deletions
diff --git a/guix/cvs-download.scm b/guix/cvs-download.scm
index cb42103aae..76b3eac739 100644
--- a/guix/cvs-download.scm
+++ b/guix/cvs-download.scm
@@ -60,35 +60,26 @@
"Return a fixed-output derivation that fetches REF, a <cvs-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 zlib
- (module-ref (resolve-interface '(gnu packages compression)) 'zlib))
-
- (define config.scm
- (scheme-file "config.scm"
- #~(begin
- (define-module (guix config)
- #:export (%libz))
-
- (define %libz
- #+(file-append zlib "/lib/libz")))))
+ (define guile-zlib
+ (module-ref (resolve-interface '(gnu packages guile)) 'guile-zlib))
(define modules
- (cons `((guix config) => ,config.scm)
- (delete '(guix config)
- (source-module-closure '((guix build cvs)
- (guix build download-nar))))))
+ (delete '(guix config)
+ (source-module-closure '((guix build cvs)
+ (guix build download-nar)))))
(define build
(with-imported-modules modules
- #~(begin
- (use-modules (guix build cvs)
- (guix build download-nar))
+ (with-extensions (list guile-zlib)
+ #~(begin
+ (use-modules (guix build cvs)
+ (guix build download-nar))
- (or (cvs-fetch '#$(cvs-reference-root-directory ref)
- '#$(cvs-reference-module ref)
- '#$(cvs-reference-revision ref)
- #$output
- #:cvs-command (string-append #+cvs "/bin/cvs"))
- (download-nar #$output)))))
+ (or (cvs-fetch '#$(cvs-reference-root-directory ref)
+ '#$(cvs-reference-module ref)
+ '#$(cvs-reference-revision ref)
+ #$output
+ #:cvs-command (string-append #+cvs "/bin/cvs"))
+ (download-nar #$output))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "cvs-checkout") build