[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: gexp: Add 'load-path?' field to <scheme-file>.
From: |
guix-commits |
Subject: |
01/08: gexp: Add 'load-path?' field to <scheme-file>. |
Date: |
Wed, 22 Apr 2020 13:24:17 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 34faf63ebc9221f5cac460bc54237ea8436d5046
Author: Ludovic Courtès <address@hidden>
AuthorDate: Wed Apr 22 15:24:47 2020 +0200
gexp: Add 'load-path?' field to <scheme-file>.
* guix/gexp.scm (<scheme-file>)[load-path?]: New field.
(scheme-file): Add #:set-load-path? and honor it.
(scheme-file-compiler): Pass #:set-load-path? to 'gexp->file'.
* doc/guix.texi (G-Expressions): Document it.
---
doc/guix.texi | 3 ++-
guix/gexp.scm | 12 +++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index a79bbfc..990703c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7955,7 +7955,8 @@ The resulting file holds references to all the
dependencies of @var{exp}
or a subset thereof.
@end deffn
-@deffn {Scheme Procedure} scheme-file @var{name} @var{exp} [#:splice? #f]
+@deffn {Scheme Procedure} scheme-file @var{name} @var{exp} @
+ [#:splice? #f] [#:set-load-path? #t]
Return an object representing the Scheme file @var{name} that contains
@var{exp}.
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 4ac0411..c320065 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -472,24 +472,26 @@ This is the declarative counterpart of 'gexp->script'."
#:target target))))
(define-record-type <scheme-file>
- (%scheme-file name gexp splice?)
+ (%scheme-file name gexp splice? load-path?)
scheme-file?
(name scheme-file-name) ;string
(gexp scheme-file-gexp) ;gexp
- (splice? scheme-file-splice?)) ;Boolean
+ (splice? scheme-file-splice?) ;Boolean
+ (load-path? scheme-file-set-load-path?)) ;Boolean
-(define* (scheme-file name gexp #:key splice?)
+(define* (scheme-file name gexp #:key splice? (set-load-path? #t))
"Return an object representing the Scheme file NAME that contains GEXP.
This is the declarative counterpart of 'gexp->file'."
- (%scheme-file name gexp splice?))
+ (%scheme-file name gexp splice? set-load-path?))
(define-gexp-compiler (scheme-file-compiler (file <scheme-file>)
system target)
;; Compile FILE by returning a derivation that builds the file.
(match file
- (($ <scheme-file> name gexp splice?)
+ (($ <scheme-file> name gexp splice? set-load-path?)
(gexp->file name gexp
+ #:set-load-path? set-load-path?
#:splice? splice?
#:system system
#:target target))))
- branch master updated (f916ac1 -> 9475c63), guix-commits, 2020/04/22
- 01/08: gexp: Add 'load-path?' field to <scheme-file>.,
guix-commits <=
- 03/08: profiles: Add #:name parameter to 'profile-derivation'., guix-commits, 2020/04/22
- 06/08: gnu: maths: dune-*: Update to version 2.7, guix-commits, 2020/04/22
- 02/08: system: 'operating-system-boot-parameters-file' uses 'scheme-file'., guix-commits, 2020/04/22
- 04/08: gnu: Add blueman., guix-commits, 2020/04/22
- 07/08: services: Add udev-rules-service helper., guix-commits, 2020/04/22
- 05/08: system: Split %BASE-PACKAGES in smaller parts., guix-commits, 2020/04/22
- 08/08: doc: Adjust @var vs. @code., guix-commits, 2020/04/22