aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build-system/emacs.scm11
-rw-r--r--guix/build/emacs-build-system.scm11
2 files changed, 17 insertions, 5 deletions
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 9a46ecfd26..02296829c6 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -17,6 +17,8 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system emacs)
+ #:use-module ((guix build emacs-build-system)
+ #:select (%default-include %default-exclude))
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
@@ -28,7 +30,10 @@
#:use-module (srfi srfi-26)
#:export (%emacs-build-system-modules
emacs-build
- emacs-build-system))
+ emacs-build-system)
+ #:re-export (%default-include ;for convenience
+ %default-exclude))
+
;; Commentary:
;;
@@ -83,8 +88,8 @@
(phases '(@ (guix build emacs-build-system)
%standard-phases))
(outputs '("out"))
- (include ''("^[^/]*\\.el$" "^[^/]*\\.info$" "^doc/.*\\.info$"))
- (exclude ''("^\\.dir-locals\\.el$" "-pkg\\.el$" "^[^/]*tests?\\.el$"))
+ (include (quote %default-include))
+ (exclude (quote %default-exclude))
(search-paths '())
(system (%current-system))
(guile #f)
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."