diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-07-12 17:57:28 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-07-12 22:47:08 +0200 |
commit | 9c14a487bb3813ec5a555536b6bd1c4160ebb042 (patch) | |
tree | f8298b6efbdb5d3807d563005fa246e9da31c35f /guix/gexp.scm | |
parent | a769bffb65d6ddfc108a4904641b310029f4924f (diff) | |
download | gnu-guix-9c14a487bb3813ec5a555536b6bd1c4160ebb042.tar gnu-guix-9c14a487bb3813ec5a555536b6bd1c4160ebb042.tar.gz |
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.
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r-- | guix/gexp.scm | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm index ec4fe0896a..302879fb42 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) |