diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2018-02-12 22:11:38 -0500 |
---|---|---|
committer | Arun Isaac <arunisaac@systemreboot.net> | 2018-04-20 00:49:53 +0530 |
commit | 9490c411f0d9a0a9476cb7b0855f5c2461c49b38 (patch) | |
tree | 335bf6bd58b9264987f7f234ba4a3be3181b34a5 | |
parent | d1d41db6bb7a836fd2347d965287040b6545cecf (diff) | |
download | guix-9490c411f0d9a0a9476cb7b0855f5c2461c49b38.tar guix-9490c411f0d9a0a9476cb7b0855f5c2461c49b38.tar.gz |
gnu: ert-runner: Adjust ert-runner wrapper to honor EMACSLOADPATH.
* gnu/packages/emacs.scm (ert-runner): Use 'prefix instead of '= for setting
the EMACSLOADPATH environment variable. Reuse the already computed
EMACSLOADPATH for wrap-program. Specify the dependencies directly in the
inputs field.
Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
-rw-r--r-- | gnu/packages/emacs.scm | 97 |
1 files changed, 41 insertions, 56 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 0a74c4eb32..81173947c6 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6176,64 +6176,49 @@ Emacs.") ;; Tests for ert-runner have a circular dependency with ecukes, and therefore ;; cannot be run (define-public ert-runner - (let ((dependencies - `(("emacs-ansi" ,emacs-ansi) - ("emacs-commander" ,emacs-commander) - ("emacs-dash" ,emacs-dash) - ("emacs-f" ,emacs-f) - ("emacs-s" ,emacs-s) - ("emacs-shut-up" ,emacs-shut-up)))) - (package - (name "ert-runner") - (version "0.7.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/rejeep/ert-runner.el/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp")))) - (build-system emacs-build-system) - (inputs dependencies) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'install-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "bin/ert-runner" - (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)") - (string-append "ERT_RUNNER=\"" out - "/share/emacs/site-lisp/guix.d/" - ,name "-" ,version))) - (install-file "bin/ert-runner" (string-append out "/bin")) - (wrap-program (string-append out "/bin/ert-runner") - (list "EMACSLOADPATH" ":" '= - (append - ,(match dependencies - (((labels packages) ...) - `(map (lambda (label package version) - (string-append (assoc-ref inputs label) - "/share/emacs/site-lisp/guix.d/" - (string-drop package 6) - "-" version)) - ',labels - ',(map package-name packages) - ',(map package-version packages)))) - ;; empty element to include the default load path as - ;; determined by emacs' standard initialization - ;; procedure - (list "")))) - #t)))) - #:include (cons* "^reporters/.*\\.el$" %default-include))) - (home-page "https://github.com/rejeep/ert-runner.el") - (synopsis "Opinionated Ert testing workflow") - (description "@code{ert-runner} is a tool for Emacs projects tested + (package + (name "ert-runner") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/rejeep/ert-runner.el/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp")))) + (build-system emacs-build-system) + (inputs + `(("emacs-ansi" ,emacs-ansi) + ("emacs-commander" ,emacs-commander) + ("emacs-dash" ,emacs-dash) + ("emacs-f" ,emacs-f) + ("emacs-s" ,emacs-s) + ("emacs-shut-up" ,emacs-shut-up))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "bin/ert-runner" + (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)") + (string-append "ERT_RUNNER=\"" out + "/share/emacs/site-lisp/guix.d/" + ,name "-" ,version))) + (install-file "bin/ert-runner" (string-append out "/bin")) + (wrap-program (string-append out "/bin/ert-runner") + (list "EMACSLOADPATH" ":" 'prefix + (string-split (getenv "EMACSLOADPATH") #\:))) + #t)))) + #:include (cons* "^reporters/.*\\.el$" %default-include))) + (home-page "https://github.com/rejeep/ert-runner.el") + (synopsis "Opinionated Ert testing workflow") + (description "@code{ert-runner} is a tool for Emacs projects tested using ERT. It assumes a certain test structure setup and can therefore make running tests easier.") - (license license:gpl3+)))) + (license license:gpl3+))) (define-public emacs-disable-mouse (package |