summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/build/syscalls.scm16
1 files changed, 5 insertions, 11 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 3c84d3893f..f2fdb4d9d1 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -396,17 +396,11 @@ the returned procedure is called."
     ((_ (proc args ...) body ...)
      (define-as-needed proc (lambda* (args ...) body ...)))
     ((_ variable value)
-     (begin
-       (when (module-defined? the-scm-module 'variable)
-         (re-export variable))
-
-       (define variable
-         (if (module-defined? the-scm-module 'variable)
-             (module-ref the-scm-module 'variable)
-             value))
-
-       (unless (module-defined? the-scm-module 'variable)
-         (export variable))))))
+     (if (module-defined? the-scm-module 'variable)
+         (module-re-export! (current-module) '(variable))
+         (begin
+           (module-define! (current-module) 'variable value)
+           (module-export! (current-module) '(variable)))))))
 
 
 ;;;