aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/derivations.scm11
-rw-r--r--guix/gexp.scm4
2 files changed, 9 insertions, 6 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index f24e3c6f92..2af65b1dc0 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -91,6 +91,7 @@
built-derivations
+ module->source-file-name
build-expression->derivation)
;; Re-export it from here for backward compatibility.
@@ -1040,6 +1041,12 @@ system, imported, and appears under FINAL-PATH in the resulting store path."
;; up looking for the same files over and over again.
(memoize search-path))
+(define (module->source-file-name module)
+ "Return the file name corresponding to MODULE, a Guile module name (a list
+of symbols.)"
+ (string-append (string-join (map symbol->string module) "/")
+ ".scm"))
+
(define* (%imported-modules store modules ;deprecated
#:key (name "module-import")
(system (%current-system))
@@ -1051,9 +1058,7 @@ search path."
;; TODO: Determine the closure of MODULES, build the `.go' files,
;; canonicalize the source files through read/write, etc.
(let ((files (map (lambda (m)
- (let ((f (string-append
- (string-join (map symbol->string m) "/")
- ".scm")))
+ (let ((f (module->source-file-name m)))
(cons f (search-path* module-path f))))
modules)))
(imported-files store files #:name name #:system system
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 7cbc79c31c..c408c94c43 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -918,9 +918,7 @@ search path."
;; TODO: Determine the closure of MODULES, build the `.go' files,
;; canonicalize the source files through read/write, etc.
(let ((files (map (lambda (m)
- (let ((f (string-append
- (string-join (map symbol->string m) "/")
- ".scm")))
+ (let ((f (module->source-file-name m)))
(cons f (search-path* module-path f))))
modules)))
(imported-files files #:name name #:system system