From e9b046fddaefbb98c931260821399090c221173d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Jul 2016 00:56:37 +0200 Subject: download: Use 'with-imported-modules'. * guix/cvs-download.scm (cvs-fetch): Use 'with-imported-modules' instead of the #:modules argument of 'gexp->derivation'. * guix/download.scm (url-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise. * guix/svn-download.scm (svn-fetch): Likewise. --- guix/cvs-download.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'guix/cvs-download.scm') diff --git a/guix/cvs-download.scm b/guix/cvs-download.scm index 72478dd2c2..85744c5b55 100644 --- a/guix/cvs-download.scm +++ b/guix/cvs-download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014 Sree Harsha Totakura ;;; Copyright © 2015 Mark H Weaver ;;; @@ -60,13 +60,15 @@ 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 build - #~(begin - (use-modules (guix build cvs)) - (cvs-fetch '#$(cvs-reference-root-directory ref) - '#$(cvs-reference-module ref) - '#$(cvs-reference-revision ref) - #$output - #:cvs-command (string-append #+cvs "/bin/cvs")))) + (with-imported-modules '((guix build cvs) + (guix build utils)) + #~(begin + (use-modules (guix build cvs)) + (cvs-fetch '#$(cvs-reference-root-directory ref) + '#$(cvs-reference-module ref) + '#$(cvs-reference-revision ref) + #$output + #:cvs-command (string-append #+cvs "/bin/cvs"))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "cvs-checkout") build @@ -74,8 +76,6 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." #:hash-algo hash-algo #:hash hash #:recursive? #t - #:modules '((guix build cvs) - (guix build utils)) #:guile-for-build guile #:local-build? #t))) -- cgit v1.2.3