From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2fMu-0007XP-7P for guix-patches@gnu.org; Sun, 01 Apr 2018 11:58:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2fMo-0001Ez-Qi for guix-patches@gnu.org; Sun, 01 Apr 2018 11:58:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2fMo-0001El-EU for guix-patches@gnu.org; Sun, 01 Apr 2018 11:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f2fMo-0008Hl-3x for guix-patches@gnu.org; Sun, 01 Apr 2018 11:58:02 -0400 Subject: [bug#31018] [PATCH] Improvements for our Emacs build system and fixes. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2fM9-0007N3-LU for guix-patches@gnu.org; Sun, 01 Apr 2018 11:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2fM4-0000wX-0z for guix-patches@gnu.org; Sun, 01 Apr 2018 11:57:21 -0400 Received: from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a]:43212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2fM2-0000vg-M6 for guix-patches@gnu.org; Sun, 01 Apr 2018 11:57:15 -0400 Received: by mail-io0-x22a.google.com with SMTP id q84so15614938iod.10 for ; Sun, 01 Apr 2018 08:57:14 -0700 (PDT) Received: from apteryx ([45.72.209.178]) by smtp.gmail.com with ESMTPSA id a128sm6153263ioa.1.2018.04.01.08.57.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 08:57:12 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 01 Apr 2018 11:57:11 -0400 Message-ID: <87y3i6538o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31018@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello Guix! This patch set strengthens our Emacs build system by enforcing strict byte compilation of every Guix package using the `emacs-build-system'. Before, errors during byte compilation would not signal a failure of the build. It also adds a custom check phase to make it easy to run any kind of program or script that might be used as a test runner (commonly ert-runner, sometimes make, etc.). I've validated that our Emacs packages (at least those whose name start by 'emacs-') can be successfully built with those changes (240 were built locally). Most of the patches below were necessary fixes to our Emacs packages so that they could be successfully byte compiled. Happy April Fools' Day ;) Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-emacs-build-system-Consider-all-inputs-for-Elisp-dep.patch >From 103834761802992380d45e31c5e8c833772aed90 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 29 Mar 2018 20:52:41 -0400 Subject: [PATCH 01/27] emacs-build-system: Consider all inputs for Elisp dependencies. * guix/build/emacs-build-system.scm (emacs-inputs): Remove. (emacs-inputs-directories): Rename to... (inputs->directories): this, and adapt for any input. (emacs-input->el-directory): Rename to... (inputs->el-directories): this, and adapt for any input. (set-emacs-load-path): Now use inputs->el-directories and inputs->el-directories. --- guix/build/emacs-build-system.scm | 44 +++++++++++++-------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm index b77984742..ba9ec88e4 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -76,8 +76,8 @@ archive, a directory, or an Emacs Lisp file." (define* (set-emacs-load-path #:key inputs #:allow-other-keys) "Set the EMACSLOADPATH environment variable so that dependencies are found." - (let* ((input-elisp-dirs (emacs-inputs-el-directories - (emacs-inputs-directories inputs))) + (let* ((input-elisp-dirs (inputs->el-directories + (inputs->directories inputs))) (emacs-load-path-value (string-join input-elisp-dirs ":" 'suffix))) (setenv "EMACSLOADPATH" emacs-load-path-value) @@ -210,39 +210,25 @@ store in '.el' files." "Check if NAME correspond to the name of an Emacs package." (string-prefix? "emacs-" name)) -(define (emacs-inputs inputs) - "Retrieve the list of Emacs packages from INPUTS." - (filter (match-lambda - ((label . directory) - (emacs-package? ((compose package-name->name+version - strip-store-file-name) - directory))) - (_ #f)) - inputs)) +(define (inputs->directories inputs) + "Extract the directory part from INPUTS." + (match inputs + (((names . directories) ...) directories))) -(define (emacs-inputs-directories inputs) - "Extract the list of Emacs package directories from INPUTS." - (let ((inputs (emacs-inputs inputs))) - (match inputs - (((names . directories) ...) directories)))) - -(define (emacs-input->el-directory emacs-input) - "Return the correct Elisp directory location of EMACS-INPUT or #f if none." - (let ((legacy-elisp-dir (string-append emacs-input %legacy-install-suffix)) +(define (input->el-directory input-dir) + "Return the correct Elisp directory location of INPUT-DIR-DIR or #f." + (let ((legacy-elisp-dir (string-append input-dir %legacy-install-suffix)) (guix-elisp-dir (string-append - emacs-input %install-suffix "/" - (store-directory->elpa-name-version emacs-input)))) + input-dir %install-suffix "/" + (store-directory->elpa-name-version input-dir)))) (cond ((file-exists? guix-elisp-dir) guix-elisp-dir) ((file-exists? legacy-elisp-dir) legacy-elisp-dir) - (else (format #t "warning: could not locate elisp directory under `~a'\n" - emacs-input) - #f)))) + (else #f)))) -(define (emacs-inputs-el-directories dirs) - "Build the list of Emacs Lisp directories from the Emacs package directory -DIRS." - (filter-map emacs-input->el-directory dirs)) +(define (inputs->el-directories input-dirs) + "Build the list of Emacs Lisp directories from the INPUT-DIRS." + (filter-map input->el-directory input-dirs)) (define (package-name-version->elpa-name-version name-ver) "Convert the Guix package NAME-VER to the corresponding ELPA name-version -- 2.16.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-emacs-build-system-Add-improved-check-phase-fixes.patch Content-Transfer-Encoding: quoted-printable >From a394694d131212f844b8adee8916aff24f5cb9aa Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 11 Feb 2018 00:51:26 -0500 Subject: [PATCH 02/27] emacs-build-system: Add improved check phase, fixes. * guix/build-system/emacs.scm (emacs-build): Remove `test-target' and 'configure-flags' arguments. Add `test-command' argument. * guix/build/emacs-build-system.scm (unpack): Add the unpacked directory to the EMACSLOADPATH. (check): New procedure. (make-autoloads): No need to return #t explicitly since the function now us= es `invoke'. (%standard-phases)[set-emacs-load-path]: Move after `unpack'. [check]: Register after the `build' phase. * guix/build/emacs-utils.scm (guix): Use (guix build utils) for `invoke'. (emacs-batch-eval): Replace `system*' usage with `invoke'. (emacs-batch-edit-file): Likewise. (emacs-byte-compile-directory): Make it fail when there are compilation errors. --- guix/build-system/emacs.scm | 6 ++---- guix/build/emacs-build-system.scm | 36 ++++++++++++++++++++++++++++-------- guix/build/emacs-utils.scm | 18 ++++++++++-------- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm index d9f1a8d28..ef6d1b339 100644 --- a/guix/build-system/emacs.scm +++ b/guix/build-system/emacs.scm @@ -84,8 +84,7 @@ #:key source (tests? #f) (parallel-tests? #t) - (test-target "test") - (configure-flags ''()) + (test-command ''("make" "check")) (phases '(@ (guix build emacs-build-system) %standard-phases)) (outputs '("out")) @@ -110,9 +109,8 @@ source) (source source)) - #:configure-flags ,configure-flags #:system ,system - #:test-target ,test-target + #:test-command ,test-command #:tests? ,tests? #:phases ,phases #:outputs %outputs diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-sys= tem.scm index ba9ec88e4..44d63b146 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -74,12 +74,14 @@ archive, a directory, or an Emacs Lisp file." #t) (gnu:unpack #:source source))) =20 -(define* (set-emacs-load-path #:key inputs #:allow-other-keys) +(define* (set-emacs-load-path #:key source inputs #:allow-other-keys) "Set the EMACSLOADPATH environment variable so that dependencies are fou= nd." - (let* ((input-elisp-dirs (inputs->el-directories + (let* ((source-dir (getcwd)) + (input-elisp-dirs (inputs->el-directories (inputs->directories inputs))) (emacs-load-path-value (string-join - input-elisp-dirs ":" 'suffix))) + `(,@input-elisp-dirs + ,source-dir) ":" 'suffix))) (setenv "EMACSLOADPATH" emacs-load-path-value) (format #t "environment variable `EMACSLOADPATH' set to ~a\n" emacs-load-path-value))) @@ -133,6 +135,24 @@ store in '.el' files." (substitute-program-names)))) #t)) =20 +(define* (check #:key target (tests? (not target)) + (test-command '("make" "check")) (parallel-tests? #t) + #:allow-other-keys) + "Like the gnu-build-system check phase, but with a way to pass a custom = test +program command line, using TEST-COMMAND." + (let* ((test-program (car test-command)) + (test-args (cdr test-command)) + (using-make? (string=3D? test-program "make"))) + (if tests? + (apply invoke test-program + `(,@test-args + ,@(if (and using-make? parallel-tests?) + `("-j" ,(number->string (parallel-job-count))) + '()))) + (begin + (format #t "test suite not run~%") + #t)))) + (define* (install #:key outputs (include %default-include) (exclude %default-exclude) @@ -203,8 +223,7 @@ store in '.el' files." (elpa-name (package-name->name+version elpa-name-ver)) (el-dir (string-append out %install-suffix "/" elpa-name-ver))) (parameterize ((%emacs emacs)) - (emacs-generate-autoloads elpa-name el-dir)) - #t)) + (emacs-generate-autoloads elpa-name el-dir)))) =20 (define (emacs-package? name) "Check if NAME correspond to the name of an Emacs package." @@ -246,12 +265,13 @@ second hyphen. This corresponds to 'name-version' as= used in ELPA packages." =20 (define %standard-phases (modify-phases gnu:%standard-phases - (add-after 'set-paths 'set-emacs-load-path set-emacs-load-path) (replace 'unpack unpack) + (add-after 'unpack 'set-emacs-load-path set-emacs-load-path) (delete 'configure) - ;; Move the build phase after install: the .el files are byte compiled - ;; directly in the store. + ;; Move the build phase after install: the .el files are byte + ;; compiled directly in the store. (delete 'build) + (replace 'check check) (replace 'install install) (add-after 'install 'build build) (add-after 'install 'make-autoloads make-autoloads) diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 8389ca582..eed17667b 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2014 Mark H Weaver ;;; Copyright =C2=A9 2014 Alex Kost +;;; Copyright =C2=A9 2018 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ ;;; along with GNU Guix. If not, see . =20 (define-module (guix build emacs-utils) + #:use-module (guix build utils) #:export (%emacs emacs-batch-eval emacs-batch-edit-file @@ -39,16 +41,14 @@ =20 (define (emacs-batch-eval expr) "Run Emacs in batch mode, and execute the elisp code EXPR." - (unless (zero? (system* (%emacs) "--quick" "--batch" - (format #f "--eval=3D~S" expr))) - (error "emacs-batch-eval failed!" expr))) + (invoke (%emacs) "--quick" "--batch" + (format #f "--eval=3D~S" expr))) =20 (define (emacs-batch-edit-file file expr) "Load FILE in Emacs using batch mode, and execute the elisp code EXPR." - (unless (zero? (system* (%emacs) "--quick" "--batch" - (string-append "--visit=3D" file) - (format #f "--eval=3D~S" expr))) - (error "emacs-batch-edit-file failed!" file expr))) + (invoke (%emacs) "--quick" "--batch" + (string-append "--visit=3D" file) + (format #f "--eval=3D~S" expr))) =20 (define (emacs-generate-autoloads name directory) "Generate autoloads for Emacs package NAME placed in DIRECTORY." @@ -60,7 +60,9 @@ =20 (define* (emacs-byte-compile-directory dir) "Byte compile all files in DIR and its sub-directories." - (let ((expr `(byte-recompile-directory (file-name-as-directory ,dir) 0))) + (let ((expr `(progn + (setq byte-compile-debug t) ;for proper exit status + (byte-recompile-directory (file-name-as-directory ,dir) 0 = 1)))) (emacs-batch-eval expr))) =20 (define-syntax emacs-substitute-sexps --=20 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Adjust-ert-runner-wrapper-to-honor-EMACSLOADPATH.patch >From 407a80cef16ec9f8afadc78b3f59a0c5e930a0e6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 12 Feb 2018 22:11:38 -0500 Subject: [PATCH 03/27] gnu: Adjust ert-runner wrapper to honor EMACSLOADPATH. * gnu/packages/emacs.scm (ert-runner): Use 'prefix instead of '= for setting the EMACSLOADPATH environment variable. --- gnu/packages/emacs.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index ce9b1a66a..e9f79ae68 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6123,7 +6123,7 @@ Emacs.") ,name "-" ,version))) (install-file "bin/ert-runner" (string-append out "/bin")) (wrap-program (string-append out "/bin/ert-runner") - (list "EMACSLOADPATH" ":" '= + (list "EMACSLOADPATH" ":" 'prefix (append ,(match dependencies (((labels packages) ...) -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Adapt-Emacs-packages-to-use-the-new-check-phase.patch >From 8c4d5790f8087784832d27edc9a151dac79bda06 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 12 Feb 2018 23:02:11 -0500 Subject: [PATCH 04/27] 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 | 218 +++++++++++++++++-------------------------------- 1 file changed, 77 insertions(+), 141 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index e9f79ae68..05ef61f08 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1509,11 +1509,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 '("sh" "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.") @@ -1706,11 +1703,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 '("sh" "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 @@ -2195,11 +2189,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 @@ -2497,15 +2488,16 @@ 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 ;; no /bin directory. Modify the test to look for the ;; /tmp directory. (substitute* "test/files-tests.el" - (("/bin/") "/tmp/")) - (zero? (system* "make" "test-batch"))))))) + (("/bin/") "/tmp/"))))) + #:tests? #t + #:test-command '("make" "test-batch"))) (home-page "http://company-mode.github.io/") (synopsis "Modular text completion framework") (description @@ -3533,11 +3525,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 @@ -3716,14 +3705,11 @@ 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.el" + "-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 @@ -3914,11 +3900,8 @@ If you want to mark a folder manually as a project just create an empty "0d7i93l3b0ck3iad9ddqp7sqa8w16hnamrby8bwvl316rqk4lzlf")))) (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 @@ -5076,32 +5059,30 @@ Yasnippet.") (define-public emacs-memoize (package - (name "emacs-memoize") - (version "20130421.b55eab0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/skeeto/emacs-memoize") - (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75"))) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "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"))))))) - (home-page "https://github.com/skeeto/emacs-memoize") - (synopsis "Emacs lisp memoization library") - (description "@code{emacs-memoize} is an Emacs library for + (name "emacs-memoize") + (version "20130421.b55eab0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/skeeto/emacs-memoize") + (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75"))) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw")))) + (build-system emacs-build-system) + (arguments + `(#: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 memoizing functions.") - (license license:unlicense))) + (license license:unlicense))) (define-public emacs-linum-relative (package @@ -5379,16 +5360,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 @@ -5483,13 +5460,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" "." + "-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") @@ -6186,32 +6160,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 @@ -6347,13 +6304,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 @@ -6382,11 +6336,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 @@ -6480,20 +6431,14 @@ editing RPM spec files.") (base32 "17mqki6g0wx46fn7dcbcc2pjxik7vvrcb1j9jzxim8b9psbsbnp9")))) (build-system emacs-build-system) + (native-inputs + `(("ert-runner" ,ert-runner))) (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 @@ -6653,11 +6598,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 @@ -7075,16 +7017,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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-emacs-pdf-tools-Fix-byte-compilation.patch >From ebef14d5e028b19cf1d0827207491542b5616975 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 14:08:15 -0400 Subject: [PATCH 05/27] gnu: emacs-pdf-tools: Fix byte compilation. * gnu/packages/emacs.scm (emacs-pdf-tools)[phases]: Add set-emacs-load-path. --- gnu/packages/emacs.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 05ef61f08..aa4d35a5b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1469,7 +1469,9 @@ filters, new key bindings and faces. It can be enabled by ;; upgrading" that pdf-tools tries to perform. (emacs-substitute-variables "pdf-tools.el" ("pdf-tools-handle-upgrades" '())))) - (add-after 'emacs-patch-variables 'emacs-install + (add-after 'emacs-patch-variables 'set-emacs-load-path + (assoc-ref emacs:%standard-phases 'set-emacs-load-path)) + (add-after 'add-cwd-to-load-path 'emacs-install (assoc-ref emacs:%standard-phases 'install)) (add-after 'emacs-install 'emacs-build (assoc-ref emacs:%standard-phases 'build)) -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-emacs-ert-expectations.patch >From 1b04b1d85ad55dcca4852a02fa1e83802e6d555a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 14:15:45 -0400 Subject: [PATCH 06/27] gnu: Add emacs-ert-expectations. * gnu/packages/emacs.scm (emacs-ert-expectations): New variable. --- gnu/packages/emacs.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index aa4d35a5b..cfbdcc9f3 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2423,6 +2423,23 @@ A minor mode @code{debbugs-browse-mode} let you browse URLs to the GNU Bug Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.") (license license:gpl3+))) +(define-public emacs-ert-expectations + (package + (name "emacs-ert-expectations") + (version "0.2") + (source + (origin + (method url-fetch) + (uri "https://www.emacswiki.org/emacs/download/ert-expectations.el") + (sha256 + (base32 + "0cwy3ilsid90abzzjb7ha2blq9kmv3gfp3icwwfcz6qczgirq6g7")))) + (build-system emacs-build-system) + (home-page "https://www.emacswiki.org/emacs/download/ert-expectations.el") + (synopsis "Simple unit test framework for Emacs") + (description "A very simple unit test framework to use with @code{ERT}.") + (license license:gpl3+))) + (define-public emacs-deferred (package (name "emacs-deferred") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-emacs-deferred-Enable-tests.patch >From 9177d71b30c33903ed194a8281f6a1090f3e82c6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 16:01:05 -0400 Subject: [PATCH 07/27] gnu: emacs-deferred: Enable tests. * gnu/packages/emacs.scm (emacs-deferred)[phases]: Add fix-makefile. [tests?]: Set to #t [test-command]: Add. [native-inputs]: Add ert-runner, emacs-ert-expectations and emacs-undercover. --- gnu/packages/emacs.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index cfbdcc9f3..648dbfb24 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2455,7 +2455,24 @@ Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.") "0xy9zb6wwkgwhcxdnslqk52bq3z24chgk6prqi4ks0qcf2bwyh5h")) (file-name (string-append name "-" version)))) (build-system emacs-build-system) - ;; FIXME: Would need 'el-expectations' to actually run tests. + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'fix-makefile + (lambda _ + (substitute* "Makefile" + (("\\$\\(CASK\\) exec ") "")) + #t))) + #:tests? #t + ;; FIXME: Normally we'd run the "test" target but for some reason the + ;; test-deferred target fails when run in the Guix build environment + ;; with the error: (file-error "Searching for program" "No such file or + ;; directory" "/bin/sh"). + #:test-command '("make" "test-concurrent" "test-concurrent-compiled"))) + (native-inputs + `(("ert-runner" ,ert-runner) + ("emacs-ert-expectations" ,emacs-ert-expectations) + ("emacs-undercover" ,emacs-undercover))) (synopsis "Simple asynchronous functions for Emacs Lisp") (description "The @code{deferred.el} library provides support for asynchronous tasks. -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0008-gnu-emacs-org-trello-Fix-byte-compilation.patch >From 6c66fcb691b8e247db791dd16ee079543fa244b0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 16:03:35 -0400 Subject: [PATCH 08/27] gnu: emacs-org-trello: Fix byte compilation. * gnu/packages/emacs.scm (emacs-org-trello)[native-inputs]: Add emacs-f and emacs-helm. --- gnu/packages/emacs.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 648dbfb24..e52b00393 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2973,7 +2973,9 @@ started with 20 minutes. All values are customizable.") `(("emacs-deferred" ,emacs-deferred) ("emacs-request" ,emacs-request) ("emacs-dash" ,emacs-dash) - ("emacs-s" ,emacs-s))) + ("emacs-s" ,emacs-s) + ("emacs-f" ,emacs-f) + ("emacs-helm" ,emacs-helm))) (home-page "https://org-trello.github.io") (synopsis "Emacs minor mode for interacting with Trello") (description "This package provides an Emacs minor mode to extend -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0009-gnu-emacs-smartparens-Fix-byte-compilation.patch >From 4f56723c3a94a67bbf3d70b50372d54f4aedce8f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 16:05:28 -0400 Subject: [PATCH 09/27] gnu: emacs-smartparens: Fix byte compilation. * gnu/packages/emacs.scm (emacs-smartparens)[propagated-inputs]: Add emacs-markdown-mode. --- gnu/packages/emacs.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index e52b00393..5fd95a636 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -3102,7 +3102,9 @@ single theme but a set of guidelines with numerous implementations.") (base32 "0q5as813xs8y29i3v2rm97phd6m7xsmmw6hwbvx57gwmi8i1c409")))) (build-system emacs-build-system) - (propagated-inputs `(("emacs-dash" ,emacs-dash))) + (propagated-inputs + `(("emacs-dash" ,emacs-dash) + ("emacs-markdown-mode" ,emacs-markdown-mode))) (home-page "https://github.com/Fuco1/smartparens") (synopsis "Paredit-like insertion, wrapping and navigation with user defined pairs") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0010-gnu-emacs-realgud-Adapt-phase-for-the-reworked-emacs.patch >From 22ac5d931c1e1d377c614e86b78aa512e25f9982 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 16:09:38 -0400 Subject: [PATCH 10/27] gnu: emacs-realgud: Adapt phase for the reworked emacs-build-system. * gnu/packages/emacs.scm (emacs-realgud)[phases]: Move the fix-autogen-script after the set-emacs-load-path phase. --- gnu/packages/emacs.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 5fd95a636..4c7bba5b2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -3283,7 +3283,7 @@ after buffer changes.") `(#:tests? #t #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-autogen-script + (add-after 'set-emacs-load-path 'fix-autogen-script (lambda _ (substitute* "autogen.sh" (("./configure") "sh configure")))) -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0011-gnu-emacs-request-Fix-byte-compilation.patch >From 2e683c9706f283703de7c7b437a48b093e836616 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 16:11:53 -0400 Subject: [PATCH 11/27] gnu: emacs-request: Fix byte compilation. * gnu/packages/emacs.scm (emacs-request)[propagated-inputs]: Add emacs-deferred. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 4c7bba5b2..377a04153 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -3337,6 +3337,8 @@ parallel.") (base32 "0wyxqbb35yqf6ci47531lk32d6fppamx9d8826kdz983vm87him7")))) (build-system emacs-build-system) + (propagated-inputs + `(("emacs-deferred" ,emacs-deferred))) (home-page "https://github.com/tkf/emacs-request") (synopsis "Package for speaking HTTP in Emacs Lisp") (description "This package provides a HTTP request library with multiple -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0012-gnu-emacs-idris-mode-Fix-hash.patch >From ca084b686b198a8ba13176a66ffb8e6e0c6bd365 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 19 Mar 2018 21:13:33 -0400 Subject: [PATCH 12/27] gnu: emacs-idris-mode: Fix hash. * gnu/packages/emacs.scm (emacs-idris-mode): Fix hash. --- gnu/packages/emacs.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 377a04153..5c97a0f0c 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6602,7 +6602,7 @@ key. Optionally, a mouse pop-up can be added by binding version ".tar")) (sha256 (base32 - "0ld4kfwnyyhlsnj5f6cbn4is4mpxdqalk2aifkw02r00mbr9n294")))) + "0qm4gngl6lqvra7kmivz99y3ymrg36nvqh5y9gy6gq0aa0v8az46")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-prop-menu" ,emacs-prop-menu))) -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0013-gnu-emacs-sx-Fix-build-issue.patch >From b55edc3c6d17ad45062a551fdc9d26e927b0cf75 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 19 Mar 2018 21:28:42 -0400 Subject: [PATCH 13/27] gnu: emacs-sx: Fix build issue. The package would fail building when attempting to create a cache directory. This has been fixed upstream but not in a tagged release. * gnu/packages/emacs.scm (emacs-sx): Update to latest git version. --- gnu/packages/emacs.scm | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 5c97a0f0c..4f6b0f9cd 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1734,26 +1734,30 @@ strings.") (license license:gpl2+))) (define-public emacs-sx - (package - (name "emacs-sx") - (version "0.4") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/vermiculus/sx.el/" - "archive/v" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1w0xghfljqg31axcnv8gzlrd8pw25nji6idnrhflq0af9qh1dw03")))) - (build-system emacs-build-system) - (propagated-inputs - `(("emacs-markdown-mode" ,emacs-markdown-mode))) - (home-page "https://github.com/vermiculus/sx.el/") - (synopsis "Emacs StackExchange client") - (description - "Emacs StackExchange client. Ask and answer questions on + (let ((version "20180212") + (revision "1") + (commit "833435fbf90d1c9e927d165b155f3b1ef39271de")) + (package + (name "emacs-sx") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vermiculus/sx.el") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1369xaxq1vy3d9yh862ddnhddikdpg2d0wv1ly00pnvdp9v4cqgd")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-markdown-mode" ,emacs-markdown-mode))) + (home-page "https://github.com/vermiculus/sx.el") + (synopsis "Emacs StackExchange client") + (description + "Emacs StackExchange client. Ask and answer questions on Stack Overflow, Super User, and other StackExchange sites.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public emacs-f (package -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0014-gnu-emacs-polymode-Fix-compilation-error.patch >From fbc0f30c2df7857f3f853c5051ef6848dac32919 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 19 Mar 2018 21:55:27 -0400 Subject: [PATCH 14/27] gnu: emacs-polymode: Fix compilation error. * gnu/packages/emacs.scm (emacs-polymode) [add-modes-subdir-to-loadpath]: New phase. --- gnu/packages/emacs.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 4f6b0f9cd..cdd4904f7 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6932,6 +6932,15 @@ contexts. (base32 "057cybkq3cy07n5s332k071sjiky3mziy003lza4rh75mgqkwhmh")))) (build-system emacs-build-system) + (arguments + `(#:include (cons* "^modes/.*\\.el$" %default-include) + #:phases + (modify-phases %standard-phases + (add-after 'set-emacs-load-path 'add-modes-subdir-to-load-path + (lambda _ + (setenv "EMACSLOADPATH" + (string-append (getenv "EMACSLOADPATH") + ":" (getcwd) "/modes" ":"))))))) (home-page "https://github.com/vspinu/polymode") (synopsis "Framework for multiple Emacs modes based on indirect buffers") (description "Polymode is an Emacs package that offers generic support -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0015-gnu-Add-emacs-scel.patch >From 172e42ae07cb5585d83403d3afc7c83c10d8c53f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 18 Mar 2018 16:37:30 -0400 Subject: [PATCH 15/27] gnu: Add emacs-scel. * gnu/packages/emacs.scm (emacs-scel): New variable. --- gnu/packages/emacs.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index cdd4904f7..420c0526b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2643,6 +2643,59 @@ implementation in Emacs. To use it just load this file and bind that function to a key in your preferred mode.") (license license:public-domain)))) +(define-public emacs-scel + (let ((version "20170629") + (revision "1") + (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b")) + (package + (name "emacs-scel") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/supercollider/scel.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'move-el-files + (lambda _ + (for-each + (lambda (f) + (rename-file f (basename f))) + (find-files "el" "^.*\\.el(\\.in)?$")) + #t)) + (add-after 'move-el-files 'configure-sclang-vars + (lambda* (#:key inputs #:allow-other-keys) + (let ((supercollider (assoc-ref inputs "supercollider"))) + (substitute* "sclang-vars.el.in" + (("@PKG_DATA_DIR@") + (string-append supercollider "/share/SuperCollider")) + ;; See: https://github.com/widp/el-supercollider/issues/1 + (("Help") "HelpSource"))) + (rename-file "sclang-vars.el.in" "sclang-vars.el") + #t)) + (add-after 'configure-sclang-vars 'install-extensions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (ext-dir (string-append + out "/share/SuperCollider/Extensions" + "/scide_scel"))) + (delete-file "sc/CMakeLists.txt") + (copy-recursively "sc" ext-dir)) + #t))))) + (inputs + `(("supercollider" ,supercollider))) + (home-page "https://github.com/supercollider/scel") + (synopsis "SuperCollider Emacs interface") + (description "scel is an Emacs based interface to SuperCollider.") + (license license:gpl2+)))) + (define-public emacs-mit-scheme-doc (package (name "emacs-mit-scheme-doc") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0016-gnu-Add-emacs-kv.patch >From 086aa7bcec4cea5c5942f6b86772fa9ac71848c0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 24 Mar 2018 21:37:41 -0400 Subject: [PATCH 16/27] gnu: Add emacs-kv. * gnu/packages/emacs.scm (emacs-kv): New variable. --- gnu/packages/emacs.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 420c0526b..f8696d301 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -7245,6 +7245,31 @@ scratch buffer, and, by virtue of this extension, do so using the Emacs formatting rules for that language.") (license license:bsd-2)))) +(define-public emacs-kv + (package + (name "emacs-kv") + (version "0.0.19") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nicferrier/emacs-kv.git") + (commit "721148475bce38a70e0b678ba8aa923652e8900e"))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0r0lz2s6gvy04fwnafai668jsf4546h4k6zd6isx5wpk0n33pj5m")))) + (build-system emacs-build-system) + (arguments + `(#:tests? #t + #:test-command '("ert-runner" "kv-tests.el"))) + (native-inputs + `(("ert-runner" ,ert-runner))) + (home-page "https://github.com/nicferrier/emacs-kv") + (synopsis "Key/value data structures library") + (description "A collection of tools for dealing with key/value data +structures such as plists, alists and hash-tables.") + (license license:gpl3+))) + (define-public emacs-esxml (package (name "emacs-esxml") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0017-gnu-emacs-esxml-Fix-byte-compilation.patch >From 6f270606bf6505a845437db5a11cd6e2d636010a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 24 Mar 2018 23:07:18 -0400 Subject: [PATCH 17/27] gnu: emacs-esxml: Fix byte compilation. * gnu/packages/emacs.scm (emacs-esxml): Add phases to patch sources. --- gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index f8696d301..999831c6a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -7284,6 +7284,32 @@ structures such as plists, alists and hash-tables.") (base32 "00vv8a75wdklygdyr4km9mc2ismxak69c45jmcny41xl44rp9x8m")))) (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; See: https://github.com/tali713/esxml/pull/28. + (add-after 'unpack 'fix-css-lite.el + (lambda _ + (substitute* "css-lite.el" + ((";;; main interface") + (string-append ";;; main interface\n" + "(require 'cl-lib)")) + (("mapcan") + "cl-mapcan") + (("',\\(cl-mapcan #'process-css-rule rules\\)") + "(cl-mapcan #'process-css-rule ',rules)")) + #t)) + (add-after 'fix-css-lite.el 'fix-esxml-form.el + (lambda _ + (substitute* "esxml-form.el" + ((",esxml-form-field-defn") + "#'esxml-form-field-defn")))) + ;; See: https://github.com/tali713/esxml/issues/25 + (add-after 'fix-esxml-form.el 'rm-broken-test-file.el + (lambda _ + (delete-file "esxpath.el")))))) + (propagated-inputs + `(("emacs-kv" ,emacs-kv))) (home-page "https://github.com/tali713/esxml/") (synopsis "SXML for EmacsLisp") (description "This is XML/XHTML done with S-Expressions in EmacsLisp. -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0018-gnu-emacs-mu4e-alert-Fix-byte-compilation.patch >From b0d12ab881d3827862727f8dd3c5501bc93f3038 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 28 Mar 2018 20:56:18 -0400 Subject: [PATCH 18/27] gnu: emacs-mu4e-alert: Fix byte compilation. * gnu/packages/emacs.scm (emacs-mu4e-alert)[propagated-inputs]: Add mu. --- gnu/packages/emacs.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 999831c6a..3eb64e4ae 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -89,6 +89,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages glib) #:use-module (gnu packages acl) + #:use-module (gnu packages mail) #:use-module (gnu packages package-management) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) @@ -5023,7 +5024,8 @@ customizable by the user.") "07qc834qnxn8xi4bw5nawj8g91bmkzw0r0vahkgysp7r9xrf57gj")))) (build-system emacs-build-system) (propagated-inputs - `(("emacs-alert" ,emacs-alert) + `(("mu" ,mu) ;for byte compilation + ("emacs-alert" ,emacs-alert) ("emacs-s" ,emacs-s) ("emacs-ht" ,emacs-ht))) (home-page "https://github.com/iqbalansari/mu4e-alert") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0019-gnu-emacs-org-contrib-Fix-hash-and-byte-compilation.patch >From 9a3a449121246a2d26a92ee5c19d905768789a10 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 28 Mar 2018 21:50:15 -0400 Subject: [PATCH 19/27] gnu: emacs-org-contrib: Fix hash and byte compilation. * gnu/packages/emacs.scm (emacs-org-contrib)[native-inputs]: Add emacs-scel. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3eb64e4ae..a79d15d33 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4638,6 +4638,8 @@ reproducible research.") out "/share/emacs/site-lisp/guix.d/org-contrib-" ,version) (for-each delete-file duplicates)) #t)))))) + (native-inputs + `(("emacs-scel" ,emacs-scel))) ;for byte compilation (propagated-inputs `(("emacs-org" ,emacs-org))) (synopsis "Contributed packages to Org mode") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0020-gnu-emacs-evil-matchit-Fix-byte-compilation.patch >From 9b5c7216ecb00e433a22687d6a54eba2f20ac0eb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 20:41:48 -0400 Subject: [PATCH 20/27] gnu: emacs-evil-matchit: Fix byte compilation. * gnu/packages/emacs.scm (emacs-evil-matchit)[propagated-inputs]: Add emacs-evil. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a79d15d33..afa57e65c 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -7080,6 +7080,8 @@ Feautures: (base32 "1hm0k53m7d8zv2pk4p93k5mmilsv1mz7y2z6dqf7r6f0zmncs31a")))) (build-system emacs-build-system) + (propagated-inputs + `(("evil" ,emacs-evil))) (home-page "https://github.com/redguardtoo/evil-matchit") (synopsis "Vim matchit ported into Emacs") (description -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0021-gnu-Add-emacs-spark.patch >From f6642cee6419a1e720070673767b7a30e3d132bb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 21:18:16 -0400 Subject: [PATCH 21/27] gnu: Add emacs-spark. * gnu/packages/emacs.scm (emacs-spark): New variable. --- gnu/packages/emacs.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index afa57e65c..b8601f868 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1907,6 +1907,29 @@ Expectations, but it can be used in other contexts.") definitions for testing with the Ecukes framework.") (license license:gpl3+))) +(define-public emacs-spark + (let ((version "20160503") ;no proper tag, use date of commit + (commit "0bf148c3ede3b31d56fd75f347cdd0b0eae60025") + (revision "1")) + (package + (name "emacs-spark") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alvinfrancis/spark.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ykqr86j17mi95s08d9fp02d7ych1331b04dcqxzxnmpkhwngyj1")))) + (build-system emacs-build-system) + (home-page "https://github.com/alvinfrancis/spark") + (synopsis "Port of cl-spark to Emacs Lisp") + (description "This library is a straightforward port of @code{cl-spark} +to Emacs Lisp.") + (license license:expat)))) + (define-public emacs-es-mode (package (name "emacs-es-mode") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0022-gnu-emacs-es-mode-Fix-byte-compilation.patch >From 09b506e8ac6a948a7e788f7e621ea3805e497a3e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 21:18:36 -0400 Subject: [PATCH 22/27] gnu: emacs-es-mode: Fix byte compilation. * gnu/packages/emacs.scm (emacs-es-mode)[propagated-inputs]: Add emacs-dash and emacs-spark. --- gnu/packages/emacs.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b8601f868..1362aed31 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1947,7 +1947,9 @@ to Emacs Lisp.") (propagated-inputs ;; The version of org in Emacs 24.5 is not sufficient, and causes tables ;; to be rendered incorrectly - `(("emacs-org" ,emacs-org))) + `(("emacs-org" ,emacs-org) + ("emacs-dash" ,emacs-dash) + ("emacs-spark" ,emacs-spark))) (home-page "https://github.com/dakrone/es-mode") (synopsis "Major mode for editing Elasticsearch queries") (description "@code{es-mode} includes highlighting, completion and -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0023-gnu-Add-emacs-eimp.patch >From af77425293a4fba3cc5c5742c69d531507a8becb Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 21:46:35 -0400 Subject: [PATCH 23/27] gnu: Add emacs-eimp. * gnu/packages/emacs.scm (emacs-eimp): New variable. --- gnu/packages/emacs.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 1362aed31..6bffd10ed 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6374,6 +6374,44 @@ from within Emacs. Restclient runs queries from a plan-text query sheet, displays results pretty-printed in XML or JSON with @code{restclient-mode}") (license license:public-domain)))) +(define-public emacs-eimp + (let ((version "1.4.0") + (commit "2e7536fe6d8f7faf1bad7a8ae37faba0162c3b4f") + (revision "1")) + (package + (name "emacs-eimp") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nicferrier/eimp.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "154d57yafxbcf39r89n5j43c86rp2fki3lw3gwy7ww2g6qkclcra")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-mogrify-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((imagemagick (assoc-ref inputs "imagemagick"))) + ;; eimp.el is read-only in git. + (invoke "chmod" "+w" "eimp.el") + (emacs-substitute-variables "eimp.el" + ("eimp-mogrify-program" + (string-append imagemagick "/bin/mogrify")))) + #t))))) + (inputs + `(("imagemagick" ,imagemagick))) ;provides the mogrify binary. + (home-page "https://github.com/nicferrier/eimp") + (synopsis "Interactive image manipulation from within Emacs") + (description "This package allows interactive image manipulation from +within Emacs. It uses the code@{mogrify} utility from ImageMagick to do the +actual transformations.") + (license license:gpl2+)))) + (define-public emacs-dired-hacks (let ((commit "eda68006ce73bbf6b9b995bfd70d08bec8cade36") (revision "1")) -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0024-gnu-emacs-dired-hacks-Fix-byte-compilation.patch >From 95cf21463f6ec9141df70aec5403851afdda0e82 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 22:56:29 -0400 Subject: [PATCH 24/27] gnu: emacs-dired-hacks: Fix byte compilation. * gnu/packages/emacs.scm (emacs-dired-hacks)[propagated-inputs]: Add emacs-eimp. --- gnu/packages/emacs.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6bffd10ed..0332e7e9e 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6431,6 +6431,7 @@ actual transformations.") (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) + ("emacs-eimp" ,emacs-eimp) ("emacs-f" ,emacs-f) ("emacs-s" ,emacs-s))) (home-page "https://github.com/Fuco1/dired-hacks") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0025-gnu-emacs-cdlatex-Fix-byte-compilation.patch >From 0b3fb16665fe7b2ca4818496857af1426eb766e9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 30 Mar 2018 23:16:10 -0400 Subject: [PATCH 25/27] gnu: emacs-cdlatex: Fix byte compilation. * gnu/packages/emacs.scm (emacs-cdlatex)[propagated-inputs]: Add emacs-auctex. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 0332e7e9e..c7e53333a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -5614,6 +5614,8 @@ conversion for Emacs Lisp.") (base32 "0pivapphmykc6vhvpx7hdyl55ls37vc4jcrxpvs4yk7jzcmwa9xp")))) (build-system emacs-build-system) + (propagated-inputs + `(("emacs-auctex" ,emacs-auctex))) (home-page "https://github.com/cdominik/cdlatex") (synopsis "Fast Emacs input methods for LaTeX environments and math") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0026-gnu-Add-emacs-howm.patch >From c303e1b7a0b0e96bc49521973c4d2187c25f8af1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 00:22:24 -0400 Subject: [PATCH 26/27] gnu: Add emacs-howm. * gnu/packages/emacs.scm (emacs-howm): New variable. --- gnu/packages/emacs.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index c7e53333a..803994308 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1182,6 +1182,25 @@ or XEmacs.") a set of simplified face specifications and a user-supplied color palette") (license license:gpl3+))) +(define-public emacs-howm + (package + (name "emacs-howm") + (version "1.4.4") + (source (origin + (method url-fetch) + (uri (string-append "http://howm.sourceforge.jp/a/howm-" + version ".tar.gz")) + (sha256 + (base32 + "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk")))) + (build-system emacs-build-system) + (home-page "http://howm.osdn.jp/") + (synopsis "Note-taking tool for Emacs") + (description "Howm is a note-taking tool for Emacs. Like with +code@{emacs-wiki.el}, it facilitates using hyperlinks and doing full-text +searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.") + (license license:gpl1+))) + (define-public emacs-calfw (package (name "emacs-calfw") -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0027-gnu-emacs-calfw-Fix-byte-compilation.patch >From 915b8088ecd2d1367b0844ed0eacd249e87aec76 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 31 Mar 2018 00:25:23 -0400 Subject: [PATCH 27/27] gnu: emacs-calfw: Fix byte compilation. * gnu/packages/emacs.scm (emacs-calfw)[propagated-inputs]: Add emacs-howm. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 803994308..ccd997d91 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1216,6 +1216,8 @@ searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.") (base32 "17ssg8gx66yp63nhygjq2r6kgl4h45cacmrxsxs9f0lrfcx37k0l")))) (build-system emacs-build-system) + (propagated-inputs + `(("emacs-howm" ,emacs-howm))) (home-page "https://github.com/kiwanami/emacs-calfw/") (synopsis "Calendar framework for Emacs") (description -- 2.16.1 --=-=-=--