gnu: emacs-plantuml-mode: Refresh package.

* gnu/packages/emacs-xyz.scm (emacs-plantuml-mode):
  [arguments]: Improve style, rewrite using gexps.
  <phases>: Add symlink for tests in phase 'use-local-plantuml.
  <tests?>: Disable them for now.
  <test-command>: Set it.
  [native-inputs]: Add emacs-ert-runner, icedtea.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Nicolas Graves 2025-04-27 16:52:56 +02:00 committed by Liliana Marie Prikler
parent 2a275045a7
commit f82152fd1e
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -41530,32 +41530,34 @@ PDDL files with syntax highlighting, templates, auto-completion, and more.")
(sha256 (sha256
(base32 "0yp41d2dmf3sx7qnl5x0zdjcr9y71b2wwc9m0q31v22xqn938ipc")))) (base32 "0yp41d2dmf3sx7qnl5x0zdjcr9y71b2wwc9m0q31v22xqn938ipc"))))
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:tests? #f ; Unclear why tests fail.
(add-after 'unpack 'use-local-plantuml #:test-command #~(list "ert-runner")
(lambda* (#:key inputs #:allow-other-keys) #:phases
(let ((plantuml (assoc-ref inputs "plantuml")) #~(modify-phases %standard-phases
(file "plantuml-mode.el")) (add-after 'unpack 'use-local-plantuml
(chmod file #o644) (lambda* (#:key inputs #:allow-other-keys)
(emacs-substitute-variables file (symlink (search-input-file inputs "/bin/plantuml")
("plantuml-jar-path" "bin/plantuml")
(string-append plantuml "/share/java/plantuml.jar")) (let ((file "plantuml-mode.el"))
("plantuml-executable-path" (chmod file #o644)
(string-append plantuml "/bin/plantuml")) (emacs-substitute-variables file
("plantuml-server-url" 'nil) ("plantuml-jar-path"
("plantuml-default-exec-mode" ''executable)) (search-input-file inputs "/share/java/plantuml.jar"))
(emacs-batch-edit-file file ("plantuml-executable-path"
`(progn (progn (search-input-file inputs "/bin/plantuml"))
(goto-char (point-min)) ("plantuml-server-url" 'nil)
(re-search-forward "(defun plantuml-download-jar") ("plantuml-default-exec-mode" ''executable))
(beginning-of-line) (emacs-batch-edit-file file
(kill-sexp)) `(progn (progn
(basic-save-buffer))) (goto-char (point-min))
#t)))))) (re-search-forward "(defun plantuml-download-jar")
(inputs (beginning-of-line)
(list plantuml)) (kill-sexp))
(propagated-inputs (basic-save-buffer)))))))))
(list emacs-dash)) (inputs (list plantuml))
(native-inputs (list emacs-ert-runner icedtea))
(propagated-inputs (list emacs-dash))
(build-system emacs-build-system) (build-system emacs-build-system)
(home-page "https://github.com/skuro/plantuml-mode") (home-page "https://github.com/skuro/plantuml-mode")
(synopsis "Major mode for editing PlantUML sources") (synopsis "Major mode for editing PlantUML sources")