gnu: emacs-yasnippet: Clean-up package definition.
An old snippet was causing the build to fail when using Emacs 27. * gnu/packages/emacs-xyz.scm (emacs-yasnippet)[source]: Use git-file-name, and remove obsolete snippet. [phases]{home}: New phase. This allows the rebindings test to pass. {make-tests-writable, delete-rebinding-test}: Remove phases. [description]: Re-indent.
This commit is contained in:
parent
4df47410cf
commit
fb8542ed5c
1 changed files with 7 additions and 29 deletions
|
@ -9507,48 +9507,26 @@ been adapted to work with mu4e.")
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/joaotavora/yasnippet.git")
|
(url "https://github.com/joaotavora/yasnippet.git")
|
||||||
(commit version)))
|
(commit version)))
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv"))
|
(base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv"))))
|
||||||
(modules '((guix build utils)))
|
|
||||||
(snippet
|
|
||||||
'(begin
|
|
||||||
;; YASnippet expects a "snippets" subdirectory in the same
|
|
||||||
;; directory as yasnippet.el, but we don't install it because it's
|
|
||||||
;; a git submodule pointing to an external repository. Adjust
|
|
||||||
;; `yas-snippet-dirs' to prevent warnings about a missing
|
|
||||||
;; directory.
|
|
||||||
(substitute* "yasnippet.el"
|
|
||||||
(("^ +'yas-installed-snippets-dir\\)\\)\n")
|
|
||||||
"))\n"))
|
|
||||||
#t))))
|
|
||||||
(build-system emacs-build-system)
|
(build-system emacs-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #t
|
`(#:tests? #t
|
||||||
#:test-command '("emacs" "--batch"
|
#:test-command '("emacs" "--batch"
|
||||||
"-l" "yasnippet-tests.el"
|
"-l" "yasnippet-tests.el"
|
||||||
"-f" "ert-run-tests-batch-and-exit")
|
"-f" "ert-run-tests-batch-and-exit")
|
||||||
;; FIXME: one failing test.
|
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'check 'make-tests-writable
|
;; Set HOME, otherwise test-rebindings fails.
|
||||||
|
(add-before 'check 'set-home
|
||||||
(lambda _
|
(lambda _
|
||||||
(make-file-writable "yasnippet-tests.el")
|
(setenv "HOME" (getcwd))
|
||||||
#t))
|
|
||||||
(add-before 'check 'delete-rebinding-test
|
|
||||||
(lambda _
|
|
||||||
(emacs-batch-edit-file "yasnippet-tests.el"
|
|
||||||
`(progn (goto-char (point-min))
|
|
||||||
(re-search-forward "ert-deftest test-rebindings")
|
|
||||||
(beginning-of-line)
|
|
||||||
(kill-sexp)
|
|
||||||
(basic-save-buffer)))
|
|
||||||
#t)))))
|
#t)))))
|
||||||
(home-page "https://github.com/joaotavora/yasnippet")
|
(home-page "https://github.com/joaotavora/yasnippet")
|
||||||
(synopsis "Yet another snippet extension for Emacs")
|
(synopsis "Yet another snippet extension for Emacs")
|
||||||
(description
|
(description "YASnippet is a template system for Emacs. It allows you to
|
||||||
"YASnippet is a template system for Emacs. It allows you to type an
|
type an abbreviation and automatically expand it into function templates.")
|
||||||
abbreviation and automatically expand it into function templates.")
|
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
(define-public emacs-yasnippet-snippets
|
(define-public emacs-yasnippet-snippets
|
||||||
|
|
Reference in a new issue