summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-12-16 07:56:53 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-12-16 07:59:15 +0100
commite4e4afbb885e65e62586878d82b5e90273b8f742 (patch)
treed636fa9ab0cfb0273a637c24529f85f996f00329
parent8bc4c4697c642d959aa319537bdbc0a590918d78 (diff)
Set EMACSLOADPATH.
This is necessary to adjust to changes in Guix's guix-emacs.el.
-rw-r--r--guile-studio-configure.scm12
-rw-r--r--guix/rekado/guile-studio.scm14
2 files changed, 20 insertions, 6 deletions
diff --git a/guile-studio-configure.scm b/guile-studio-configure.scm
index ec7ff45..a900597 100644
--- a/guile-studio-configure.scm
+++ b/guile-studio-configure.scm
@@ -12,7 +12,7 @@
(when (file-exists-p guix-emacs.el)
(load guix-emacs.el)))
(when (require 'guix-emacs nil t)
- (guix-emacs-autoload-packages ,@emacs-package-dirs))
+ (guix-emacs-autoload-packages))
(setq-default indent-tabs-mode nil)
(tool-bar-mode 1)
@@ -357,13 +357,17 @@ d=\"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 \
(vector 'menu-bar 'geiserm) 'undefined)))
(load-theme 'adwaita t)))
-(define (make-guile-studio-wrapper prefix share emacsdir)
+(define (make-guile-studio-wrapper prefix share emacsdir emacs-package-dirs)
(let ((wrapper (string-append prefix "/bin/guile-studio")))
(with-output-to-file wrapper
(lambda ()
(format #t "#!/bin/sh
-exec ~a/bin/emacs -Q --load ~a/guile-studio.el
+EMACSLOADPATH=~a:
+exec ~a/bin/emacs --no-site-file --no-site-lisp --no-x-resources --no-init-file --load ~a/guile-studio.el
"
+ (string-join
+ (map (cut string-append <> "/share/emacs/site-lisp")
+ emacs-package-dirs) ":")
emacsdir share)))
(chmod wrapper #o555)))
@@ -405,7 +409,7 @@ exec ~a/bin/emacs -Q --load ~a/guile-studio.el
(copy-file "logo.svg"
(string-append share "/logo.svg"))
- (make-guile-studio-wrapper prefix share emacsdir)
+ (make-guile-studio-wrapper prefix share emacsdir emacs-package-dirs)
;; Generate Guile init file.
(with-output-to-file (string-append share "/guile-studio-init.scm")
diff --git a/guix/rekado/guile-studio.scm b/guix/rekado/guile-studio.scm
index 79e6d8b..28b1b07 100644
--- a/guix/rekado/guile-studio.scm
+++ b/guix/rekado/guile-studio.scm
@@ -18,7 +18,11 @@
(source (local-file (string-append "../../guile-studio-" version ".tar.gz")))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; there are none
+ `(#:modules
+ ((ice-9 match)
+ (srfi srfi-1)
+ ,@%gnu-build-system-modules)
+ #:tests? #f ; there are none
#:make-flags
(list (string-append "ICONS_DIR="
(assoc-ref %build-inputs "adwaita-icon-theme")
@@ -29,7 +33,13 @@
(assoc-ref %build-inputs "emacs"))
(string-append "GUILE_DIR="
(assoc-ref %build-inputs "guile"))
- (string-join (cons "INPUTS=" (map cdr %build-inputs)))
+ (string-join (cons "INPUTS="
+ (filter-map
+ (lambda (input)
+ (match input
+ ((label . pkg)
+ (and (string-prefix? "emacs" label) pkg))))
+ %build-inputs)))
(string-append "PREFIX=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases