From 032100c99c666b82cec5c9b6b63618beac673743 Mon Sep 17 00:00:00 2001 From: Cayetano Santos Date: Wed, 25 Jun 2025 19:59:42 +0200 Subject: gnu: emacs-elisp-autofmt: Update to 0.1-0.fa30ffc. * gnu/packages/emacs-xyz.scm (emacs-elisp-autofmt): Update to 0.1-0.fa30ffc. [arguments]: Add #:test-command. [arguments]: Add #:include. [arguments]<#:phases>: Add fix-tests, remove install-python-module. Change-Id: I2d0b7e09887f571f9ba594a6db7933fa8d814869 Signed-off-by: Liliana Marie Prikler --- gnu/packages/emacs-xyz.scm | 78 ++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 34 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 401a2d4a6e..5c810ed3d7 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -367,42 +367,52 @@ buffer, a file on your disk, or a string from the kill ring.") (license license:gpl3+)))) (define-public emacs-elisp-autofmt - (let ((commit "5b1fdc2761a80674123769ebf8a43fe312c0fa3f") + (let ((commit "fa30ffc2320c41fc3827e2a800d40d7d5bcaddbe") (revision "0")) (package - (name "emacs-elisp-autofmt") - (version (git-version "0.0.0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://codeberg.org/ideasman42/emacs-elisp-autofmt") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "09wxrrqzccq3wv51n0blcln1zggmlm4fzrnj0svv8gir5q5g6l3h")))) - (build-system emacs-build-system) - (inputs (list python)) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-dependencies - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "elisp-autofmt.el" - (("\"python\"") - (string-append "\"" - (search-input-file inputs "/bin/python3") - "\""))))) - (add-after 'install 'install-python-module - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((destination (elpa-directory (assoc-ref outputs "out")))) - (install-file "elisp-autofmt.py" destination) - (install-file "elisp-autofmt.overrides.json" destination))))))) - (home-page "https://codeberg.org/ideasman42/emacs-elisp-autofmt") - (synopsis "Auto-format Emacs lisp") - (description "This is a package to auto-format Emacs lisp.") - (license license:gpl3+)))) + (name "emacs-elisp-autofmt") + (version (git-version "0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/ideasman42/emacs-elisp-autofmt") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "174cmqszhx42blqc6fjjf3lgaz2hasj15743hcrzj6a97nhx4wsj")))) + (build-system emacs-build-system) + (inputs (list python)) + (arguments + (list + #:test-command #~(list "make" "tests") + #:include #~(cons* "elisp-autofmt.py" + "elisp-autofmt.overrides.json" + %default-include) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-dependencies + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "elisp-autofmt.el" + (("\"python\"") + (string-append "\"" + (search-input-file inputs "/bin/python3") + "\""))))) + ;; TODO Remove when fixed upstream. See: + ;; https://codeberg.org/ideasman42/emacs-elisp-autofmt/issues/36 + (add-before 'check 'fix-tests + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) + (with-atomic-file-replacement "Makefile" + (lambda (in out) + (dump-port in out) + (display "\n.PHONY: tests\n" out))) + (substitute* "Makefile" + (("python") "python3"))))))) + (home-page "https://codeberg.org/ideasman42/emacs-elisp-autofmt") + (synopsis "Auto-format Emacs lisp") + (description "This is a package to auto-format Emacs lisp.") + (license license:gpl3+)))) (define-public emacs-ac-php (package -- cgit v1.2.3