[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/16: gexp: 'program-file' and 'gexp->script' no longer have #:modules.
From: |
Ludovic Courtès |
Subject: |
12/16: gexp: 'program-file' and 'gexp->script' no longer have #:modules. |
Date: |
Tue, 12 Jul 2016 20:48:20 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 9c14a487bb3813ec5a555536b6bd1c4160ebb042
Author: Ludovic Courtès <address@hidden>
Date: Tue Jul 12 17:57:28 2016 +0200
gexp: 'program-file' and 'gexp->script' no longer have #:modules.
* guix/gexp.scm (<program-file>)[modules]: Remove.
(program-file): Remove #:modules and adjust accordingly.
(program-file-compiler): Likewise.
(gexp->script): Likewise.
---
doc/guix.texi | 6 +++---
guix/gexp.scm | 27 ++++++++++-----------------
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1a14ff9..6d424b2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3908,7 +3908,7 @@ This is the declarative counterpart of
@code{gexp->derivation}.
@deffn {Monadic Procedure} gexp->script @var{name} @var{exp}
Return an executable script @var{name} that runs @var{exp} using
address@hidden with @var{modules} in its search path.
address@hidden, with @var{exp}'s imported modules in its search path.
The example below builds a script that simply invokes the @command{ls}
command:
@@ -3934,10 +3934,10 @@ executable file @file{/gnu/store/@dots{}-list-files}
along these lines:
@end deffn
@deffn {Scheme Procedure} program-file @var{name} @var{exp} @
- [#:modules '()] [#:guile #f]
+ [#:guile #f]
Return an object representing the executable store item @var{name} that
runs @var{gexp}. @var{guile} is the Guile package used to execute that
-script, and @var{modules} is the list of modules visible to that script.
+script.
This is the declarative counterpart of @code{gexp->script}.
@end deffn
diff --git a/guix/gexp.scm b/guix/gexp.scm
index ec4fe08..302879f 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -56,7 +56,6 @@
program-file?
program-file-name
program-file-gexp
- program-file-modules
program-file-guile
scheme-file
@@ -296,29 +295,25 @@ This is the declarative counterpart of
'gexp->derivation'."
(apply gexp->derivation name gexp options))))
(define-record-type <program-file>
- (%program-file name gexp modules guile)
+ (%program-file name gexp guile)
program-file?
(name program-file-name) ;string
(gexp program-file-gexp) ;gexp
- (modules program-file-modules) ;list of module names
(guile program-file-guile)) ;package
-(define* (program-file name gexp
- #:key (modules '()) (guile #f))
+(define* (program-file name gexp #:key (guile #f))
"Return an object representing the executable store item NAME that runs
-GEXP. GUILE is the Guile package used to execute that script, and MODULES is
-the list of modules visible to that script.
+GEXP. GUILE is the Guile package used to execute that script.
This is the declarative counterpart of 'gexp->script'."
- (%program-file name gexp modules guile))
+ (%program-file name gexp guile))
(define-gexp-compiler (program-file-compiler (file program-file?)
system target)
;; Compile FILE by returning a derivation that builds the script.
(match file
- (($ <program-file> name gexp modules guile)
+ (($ <program-file> name gexp guile)
(gexp->script name gexp
- #:modules modules
#:guile (or guile (default-guile))))))
(define-record-type <scheme-file>
@@ -1000,13 +995,11 @@ they can refer to each other."
%load-compiled-path)))))))
(define* (gexp->script name exp
- #:key (modules '()) (guile (default-guile)))
- "Return an executable script NAME that runs EXP using GUILE with MODULES in
-its search path."
- (define %modules
- (append (gexp-modules exp) modules))
-
- (mlet %store-monad ((set-load-path (load-path-expression %modules)))
+ #:key (guile (default-guile)))
+ "Return an executable script NAME that runs EXP using GUILE, with EXP's
+imported modules in its search path."
+ (mlet %store-monad ((set-load-path
+ (load-path-expression (gexp-modules exp))))
(gexp->derivation name
(gexp
(call-with-output-file (ungexp output)
- branch master updated (0885881 -> bdff55e), Ludovic Courtès, 2016/07/12
- 04/16: linux-container: Fix list of imported modules., Ludovic Courtès, 2016/07/12
- 05/16: gexp: Factorize load-path-setting expression., Ludovic Courtès, 2016/07/12
- 01/16: gexp: Keep only a single 'references' field., Ludovic Courtès, 2016/07/12
- 06/16: gexp: 'gexp->file' emits code to set '%load-path'., Ludovic Courtès, 2016/07/12
- 13/16: gexp: Remove more uses of #:modules., Ludovic Courtès, 2016/07/12
- 12/16: gexp: 'program-file' and 'gexp->script' no longer have #:modules.,
Ludovic Courtès <=
- 14/16: gnu: Remove unneeded 'imported-modules' fields for 'origin'., Ludovic Courtès, 2016/07/12
- 11/16: gexp: 'computed-file' no longer has a #:modules parameter., Ludovic Courtès, 2016/07/12
- 10/16: download: Use 'with-imported-modules'., Ludovic Courtès, 2016/07/12
- 16/16: gnu: emacs-flycheck: Add missing dependency on emacs-seq., Ludovic Courtès, 2016/07/12
- 02/16: gexp: Add 'with-imported-modules' macro., Ludovic Courtès, 2016/07/12
- 15/16: packages: <origin> no longer has an 'imported-modules' field., Ludovic Courtès, 2016/07/12
- 08/16: services: <shepherd-service> no longer has an 'imported-modules' field., Ludovic Courtès, 2016/07/12
- 09/16: profiles: Use 'with-imported-modules'., Ludovic Courtès, 2016/07/12
- 07/16: gnu: Use 'gexp->file' in conjunction with 'with-imported-modules'., Ludovic Courtès, 2016/07/12
- 03/16: gnu: Switch to 'with-imported-modules'., Ludovic Courtès, 2016/07/12