summaryrefslogtreecommitdiff
path: root/guix/build/emacs-build-system.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2017-06-03 23:43:02 -0700
committerArun Isaac <arunisaac@systemreboot.net>2017-06-08 19:45:27 +0530
commitdf34f478944217b8621315acbe21d1f1dd63f4be (patch)
treeca53835a5b583bde2053129ceb76fb27b022efc4 /guix/build/emacs-build-system.scm
parentdfe93c9ac0578b624f952d0bf98142f8f1c20775 (diff)
build-system: emacs: Factorize include/exclude default arguments.
The `install' phase of the emacs-build-system contained default arguments duplicated from the host side `emacs-build' procedure. This change factorizes them so that: 1. They are not duplicated. 2. They can be reused and extended easily when defining emacs packages. * guix/build/emacs-build-system.scm (%default-include, %default-exclude): New variables. (install): Use %default-include and %default-exclude as default arguments. * guix/build-system/emacs.scm: Use and re-export %default-include, %default-exclude from (guix build emacs-build-system). (emacs-build): Use %default-include and %default-exclude as default arguments. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
Diffstat (limited to 'guix/build/emacs-build-system.scm')
-rw-r--r--guix/build/emacs-build-system.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 50af4be363..bda699ddf4 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -29,6 +29,8 @@
#:use-module (ice-9 regex)
#:use-module (ice-9 match)
#:export (%standard-phases
+ %default-include
+ %default-exclude
emacs-build))
;; Commentary:
@@ -42,6 +44,11 @@
;; archive signature.
(define %install-suffix "/share/emacs/site-lisp/guix.d")
+;; These are the default inclusion/exclusion regexps for the install phase.
+(define %default-include '("^[^/]*\\.el$" "^[^/]*\\.info$" "^doc/.*\\.info$"))
+(define %default-exclude '("^\\.dir-locals\\.el$" "-pkg\\.el$"
+ "^[^/]*tests?\\.el$"))
+
(define gnu:unpack (assoc-ref gnu:%standard-phases 'unpack))
(define (store-file->elisp-source-file file)
@@ -96,8 +103,8 @@ store in '.el' files."
#t))
(define* (install #:key outputs
- (include '("^[^/]*\\.el$" "^[^/]*\\.info$" "^doc/.*\\.info$"))
- (exclude '("^\\.dir-locals\\.el$" "-pkg\\.el$" "^[^/]*tests?\\.el$"))
+ (include %default-include)
+ (exclude %default-exclude)
#:allow-other-keys)
"Install the package contents."