aboutsummaryrefslogtreecommitdiff
path: root/gnu.scm
diff options
context:
space:
mode:
authorJoshua S. Grant <jgrant@parenthetical.io>2015-01-22 16:59:35 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-22 17:01:01 +0100
commitfbb020451ea25896936a5fba966612b59c0bcdf3 (patch)
treec5a6650e4c6e282167d5cffa8e2e5d6626bc3158 /gnu.scm
parent3698f524d5d1777aebec653c444783800a70417a (diff)
downloadgnu-guix-fbb020451ea25896936a5fba966612b59c0bcdf3.tar
gnu-guix-fbb020451ea25896936a5fba966612b59c0bcdf3.tar.gz
gnu: Add convenience macros to make module imports more concise.
* gnu.scm (use-package-modules, use-service-modules, use-system-modules): New macros.
Diffstat (limited to 'gnu.scm')
-rw-r--r--gnu.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu.scm b/gnu.scm
index eb0bf71ab1..d9b9117b8a 100644
--- a/gnu.scm
+++ b/gnu.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015 Joshua S. Grant <jgrant@parenthetical.io>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -16,7 +17,10 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (gnu))
+(define-module (gnu)
+ #:export (use-package-modules
+ use-service-modules
+ use-system-modules))
;;; Commentary:
;;;
@@ -44,4 +48,13 @@
(module-use! i (resolve-interface m))))
%public-modules)))
+(define-syntax-rule (use-package-modules module ...)
+ (use-modules (gnu packages module) ...))
+
+(define-syntax-rule (use-service-modules module ...)
+ (use-modules (gnu services module) ...))
+
+(define-syntax-rule (use-system-modules module ...)
+ (use-modules (gnu system module) ...))
+
;;; gnu.scm ends here