>From 22a42bb822d9e75a5b0c92aa3cf8c74b01487a89 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 12 Feb 2018 23:02:11 -0500 Subject: [PATCH 06/30] gnu: Adapt Emacs packages to use the new check phase. * gnu/packages/emacs.scm (emacs-dash, emacs-s, emacs-string-inflection, emacs-company, emacs-clojure-mode, emacs-julia-mode, emacs-elfeed, emacs-memoize, emacs-use-package, emacs-xmlgen, emacs-json-reformat, emacs-which-key, emacs-ws-butler, emacs-git-messenger, emacs-browse-at-remote, emacs-evil-quickscope): Adapt to use new check phase. (emacs-json-reformat)[inputs]: Move to... [native-inputs]: here. Add ert-runner. (emacs-company): Refactor fix-bin-dir phase. (emacs-git-messenger)[native-inputs]: Add ert-runner. --- gnu/packages/emacs.scm | 178 ++++++++++++++++--------------------------------- 1 file changed, 56 insertions(+), 122 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 99fa665a1..7f6c1a4a0 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1511,11 +1511,8 @@ and stored in memory.") "1pjlkrzr8n45bnp3xs3dybvy0nz3gwamrfc7vsi1nhpkkw99ihhb")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "./run-tests.sh"))))))) + `(#:tests? #t + #:test-command '("./run-tests.sh"))) (home-page "https://github.com/magnars/dash.el") (synopsis "Modern list library for Emacs") (description "This package provides a modern list API library for Emacs.") @@ -1708,11 +1705,8 @@ allows easily move between them.") "0xbl75863pcm806zg0x1lw7qznzjq2c8320k8js7apyag8q4srvh")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "./run-tests.sh"))))))) + `(#:tests? #t + #:test-command '("./run-tests.sh"))) (home-page "https://github.com/magnars/s.el") (synopsis "Emacs string manipulation library") (description "This package provides an Emacs library for manipulating @@ -2197,11 +2191,8 @@ in Lisp modes.") (native-inputs `(("ert-runner" ,ert-runner))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "ert-runner"))))))) + `(#:tests? #t + #:test-command '("ert-runner"))) (home-page "https://github.com/akicho8/string-inflection") (synopsis "Convert symbol names between different naming conventions") (description @@ -2499,7 +2490,7 @@ build jobs.") (arguments `(#:phases (modify-phases %standard-phases - (add-before 'install 'check + (add-before 'check 'fix-bin-dir (lambda _ ;; The company-files-candidates-normal-root test looks ;; for the /bin directory, but the build environment has @@ -2507,7 +2498,9 @@ build jobs.") ;; /tmp directory. (substitute* "test/files-tests.el" (("/bin/") "/tmp/")) - (zero? (system* "make" "test-batch"))))))) + #t))) + #:tests? #t + #:test-command '("make" "test-batch"))) (home-page "http://company-mode.github.io/") (synopsis "Modular text completion framework") (description @@ -3535,11 +3528,8 @@ S-expression.") ("emacs-s" ,emacs-s) ("ert-runner" ,ert-runner))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'check - (lambda _ - (zero? (system* "ert-runner"))))))) + `(#:tests? #t + #:test-command '("ert-runner"))) (home-page "https://github.com/clojure-emacs/clojure-mode") (synopsis "Major mode for Clojure code") (description @@ -3718,14 +3708,10 @@ E-Prime forbids the use of the \"to be\" form to strengthen your writing.") "1is4dcv6blslpzbjcg8l2jpxi8xj96q4cm0nxjxsyswpm8bw8ki0")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "emacs" "-batch" - "-l" "julia-mode.el" - "-l" "julia-mode-tests.el" - "-f" "ert-run-tests-batch-and-exit"))))))) + `(#:tests? #t + #:test-command '("emacs" "--batch" + "-l" "julia-mode-tests.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/JuliaEditorSupport/julia-emacs") (synopsis "Major mode for Julia") (description "This Emacs package provides a mode for the Julia @@ -3916,11 +3902,8 @@ If you want to mark a folder manually as a project just create an empty "1fd1mx0q1qb9vgdzls5ppxfriyid48blg8smgjspiazp7kxakzxv")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "make" "test"))))))) + `(#:tests? #t + #:test-command '("make" "test"))) (home-page "https://github.com/skeeto/elfeed") (synopsis "Atom/RSS feed reader for Emacs") (description @@ -5092,13 +5075,11 @@ Yasnippet.") "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "emacs" "-batch" "-l" "memoize.el" - "-l" "memoize-test.el" - "-f" "ert-run-tests-batch-and-exit"))))))) + `(#:tests? #t + #:test-command '("emacs" "-batch" + "-l" "memoize.el" + "-l" "memoize-test.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/skeeto/emacs-memoize") (synopsis "Emacs lisp memoization library") (description "@code{emacs-memoize} is an Emacs library for @@ -5381,16 +5362,12 @@ abbreviation of the mode line displays (lighters) of minor modes.") (propagated-inputs `(("emacs-diminish" ,emacs-diminish))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "emacs" "--batch" "-L" "." - "-l" "use-package-tests.el" - "-f" "ert-run-tests-batch-and-exit")) - ;; Tests fail in this release, but have been fixed in - ;; upstream commit 7956d40eed57d6c06bef36ebc174cf57d934e30d - #t))))) + ;; Tests fail in this release, but have been fixed in + ;; upstream commit 7956d40eed57d6c06bef36ebc174cf57d934e30d + `(#:tests? #f + #:test-command '("emacs" "--batch" + "-l" "use-package-tests.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/jwiegley/use-package") (synopsis "Declaration for simplifying your .emacs") (description "The use-package macro allows you to isolate package @@ -5485,13 +5462,10 @@ fonts is supported.") "0zay490vjby3f7455r0vydmjg7q1gwc78hilpfb0rg4gwz224z8r")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "emacs" "--batch" "-L" "." - "-l" "xmlgen-test.el" - "-f" "ert-run-tests-batch-and-exit"))))))) + `(#:tests? #t + #:test-command '("emacs" "--batch" + "-l" "xmlgen-test.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/philjackson/xmlgen") (synopsis "S-expression to XML domain specific language (DSL) in Emacs Lisp") @@ -6173,32 +6147,15 @@ running a customisable handler command (@code{ignore} by default). ") "11fbq4scrgr7m0iwnzcrn2g7xvqwm2gf82sa7zy1l0nil7265p28")) (patches (search-patches "emacs-json-reformat-fix-tests.patch")))) (build-system emacs-build-system) - (propagated-inputs `(("emacs-undercover" ,emacs-undercover))) - (inputs - `(("emacs-dash" ,emacs-dash) ; for tests - ("emacs-shut-up" ,emacs-shut-up))) ; for tests + (propagated-inputs + `(("emacs-undercover" ,emacs-undercover))) + (native-inputs + `(("ert-runner" ,ert-runner) + ("emacs-dash" ,emacs-dash) + ("emacs-shut-up" ,emacs-shut-up))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda* (#:key inputs #:allow-other-keys) - (zero? (system* "emacs" "--batch" "-L" "." - "-L" (string-append - (assoc-ref inputs "emacs-undercover") - "/share/emacs/site-lisp/guix.d/undercover-" - ,(package-version emacs-undercover)) - "-L" (string-append - (assoc-ref inputs "emacs-dash") - "/share/emacs/site-lisp/guix.d/dash-" - ,(package-version emacs-dash)) - "-L" (string-append - (assoc-ref inputs "emacs-shut-up") - "/share/emacs/site-lisp/guix.d/shut-up-" - ,(package-version emacs-shut-up)) - "-l" "test/test-helper.el" - "-l" "test/json-reformat-test.el" - "-f" "ert-run-tests-batch-and-exit")) - #t))))) + `(#:tests? #t + #:test-command '("ert-runner"))) (home-page "https://github.com/gongo/json-reformat") (synopsis "Reformatting tool for JSON") (description "@code{json-reformat} provides a reformatting tool for @@ -6334,13 +6291,10 @@ displays results pretty-printed in XML or JSON with @code{restclient-mode}") (file-name (string-append name "-" version ".tar.gz")))) (build-system emacs-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "emacs" "--batch" "-L" "." - "-l" "which-key-tests.el" - "-f" "ert-run-tests-batch-and-exit"))))))) + `(#:tests? #t + #:test-command '("emacs" "--batch" + "-l" "which-key-tests.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/justbur/emacs-which-key") (synopsis "Display available key bindings in popup") (description @@ -6369,11 +6323,8 @@ settings).") (native-inputs `(("ert-runner" ,ert-runner))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "ert-runner" "tests"))))))) + `(#:tests? #t + #:test-command '("ert-runner" "tests"))) (home-page "https://github.com/lewang/ws-butler") (synopsis "Trim spaces from end of lines") (description @@ -6470,17 +6421,9 @@ editing RPM spec files.") (propagated-inputs `(("emacs-popup" ,emacs-popup))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda* (#:key inputs #:allow-other-keys) - (zero? (system* "emacs" "--batch" "-L" "." - "-L" (string-append - (assoc-ref inputs "emacs-popup") - "/share/emacs/site-lisp/guix.d/popup-" - ,(package-version emacs-popup)) - "-l" "test/test.el" - "-f" "ert-run-tests-batch-and-exit"))))))) + `(#:tests? #t + #:test-command '("emacs" "--batch" "-l" "test/test.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/syohex/emacs-git-messenger") (synopsis "Popup commit message at current line") (description "@code{emacs-git-messenger} provides @@ -6640,11 +6583,8 @@ Idris.") (native-inputs `(("ert-runner" ,ert-runner))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (zero? (system* "ert-runner"))))))) + `(#:tests? #t + #:test-command '("ert-runner"))) (home-page "https://github.com/rmuslimov/browse-at-remote") (synopsis "Open github/gitlab/bitbucket/stash page from Emacs") (description @@ -7062,16 +7002,10 @@ emulates Vim features and provides Vim-like key bindings.") (propagated-inputs `(("emacs-evil" ,emacs-evil))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'install 'check - (lambda* (#:key inputs #:allow-other-keys) - (invoke "emacs" "--batch" "-L" - (string-append (assoc-ref inputs "emacs-evil") - "/share/emacs/site-lisp/guix.d/evil-" - ,(package-version emacs-evil)) - "-l" "evil-quickscope-tests.el" - "-f" "ert-run-tests-batch-and-exit")))))) + `(#:tests? #t + #:test-command '("emacs" "--batch" + "-l" "evil-quickscope-tests.el" + "-f" "ert-run-tests-batch-and-exit"))) (home-page "https://github.com/blorbx/evil-quickscope") (synopsis "Target highlighting for emacs evil-mode f,F,t and T commands") (description "@code{emacs-evil-quickscope} highlights targets for Evil -- 2.16.1