diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2022-09-13 22:37:06 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2022-09-13 23:07:05 +0200 |
commit | a24da5c8bc20950c19f129436e4c29c8b355fd89 (patch) | |
tree | 500800736774acd791d20d4d9249150e5b17ae34 /gnu | |
parent | 66b54aef0dbf61ff086b3b848f29de5e22d2f15c (diff) | |
download | guix-a24da5c8bc20950c19f129436e4c29c8b355fd89.tar.gz guix-a24da5c8bc20950c19f129436e4c29c8b355fd89.zip |
gnu: emacs-treemacs: Update package style.
* gnu/packages/emacs-xyz.scm (emacs-treemacs)[arguments]: Use
G-expressions. Simplify PATCH-PATHS phase. Move data within the ELPA directory.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 101 |
1 files changed, 51 insertions, 50 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 39c6e60012..fc8aa02f75 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -25721,56 +25721,57 @@ processes for Emacs.") (inputs (list python)) (arguments - `(#:tests? #t - #:test-command '("make" "-C" "../.." "test") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-makefile - (lambda _ - (substitute* "Makefile" - (("@\\$\\(CASK\\) exec ") "") - ;; Guix does not need to prepare dependencies before testing. - (("test: prepare") "test:")))) - (add-after 'fix-makefile 'chdir-elisp - ;; Elisp directory is not in root of the source. - (lambda _ - (chdir "src/elisp"))) - (add-before 'check 'delete-failing-tests - ;; FIXME: 4 tests out of 254 are failing. - (lambda _ - (emacs-batch-edit-file "../../test/treemacs-test.el" - `(progn - (goto-char (point-min)) - (re-search-forward "describe \"treemacs--parent\"") - (beginning-of-line) - (kill-sexp) - (basic-save-buffer))))) - (add-before 'install 'patch-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion "../.." ;treemacs root - (chmod "src/elisp/treemacs-core-utils.el" #o644) - (emacs-substitute-variables "src/elisp/treemacs-core-utils.el" - ("treemacs-dir" - (string-append (assoc-ref outputs "out") "/"))) - (chmod "src/elisp/treemacs-icons.el" #o644) - (substitute* "src/elisp/treemacs-icons.el" - (("icons/default") "share/emacs-treemacs/images")) - (chmod "src/elisp/treemacs-customization.el" #o644) - (emacs-substitute-variables "src/elisp/treemacs-customization.el" - ("treemacs-python-executable" - (search-input-file inputs "/bin/python3"))) - (chmod "src/elisp/treemacs-async.el" #o644) - (substitute* "src/elisp/treemacs-async.el" - (("src/scripts") (string-append "share/" ,name "/scripts")))))) - (add-after 'install 'install-data - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion "../.." ;treemacs root - (copy-recursively "icons/default" - (string-append out "/share/" ,name "/images")) - (copy-recursively - "src/scripts" - (string-append out "/share/" ,name "/scripts"))))))))) + (list + #:tests? #t + #:test-command #~(list "make" "-C" "../.." "test") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-makefile + (lambda _ + (substitute* "Makefile" + (("@\\$\\(CASK\\) exec ") "") + ;; Guix does not need to prepare dependencies before testing. + (("test: prepare") "test:")))) + (add-after 'fix-makefile 'chdir-elisp + ;; Elisp directory is not in root of the source. + (lambda _ + (chdir "src/elisp"))) + (add-before 'check 'delete-failing-tests + ;; FIXME: 4 tests out of 254 are failing. + (lambda _ + (emacs-batch-edit-file "../../test/treemacs-test.el" + '(progn + (goto-char (point-min)) + (re-search-forward "describe \"treemacs--parent\"") + (beginning-of-line) + (kill-sexp) + (basic-save-buffer))))) + (add-before 'install 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (make-file-writable "treemacs-core-utils.el") + (emacs-substitute-variables "treemacs-core-utils.el" + ("treemacs-dir" (string-append #$output "/"))) + (make-file-writable "treemacs-icons.el") + (substitute* "treemacs-icons.el" + (("icons/default") + (string-append (elpa-directory #$output) "/icons/default"))) + (make-file-writable "treemacs-customization.el") + (emacs-substitute-variables "treemacs-customization.el" + ("treemacs-python-executable" + (search-input-file inputs "/bin/python3"))) + (make-file-writable "treemacs-async.el") + (substitute* "treemacs-async.el" + (("src/scripts") + (string-append (elpa-directory #$output) "/scripts"))))) + (add-after 'install 'install-data + (lambda _ + (with-directory-excursion "../.." ;treemacs root + (copy-recursively + "icons/default" + (string-append (elpa-directory #$output) "/icons/default")) + (copy-recursively + "src/scripts" + (string-append (elpa-directory #$output) "/scripts")))))))) (home-page "https://github.com/Alexander-Miller/treemacs") (synopsis "Emacs tree style file explorer") (description |