fix(notmuch): missing notmuch-version.el
Notmuch, like org, uses git describe to build a version string variable at install time, but Doom preforms shallow clones of its packages, where git describe does not work. Notmuch is one of our bigger packages and the variable isn't essential for normal use, so I've opted to build notmuch-version.el by hand. It lacks the commit offset, but it has enough information to work with. Fix #5581
This commit is contained in:
parent
45c759d7d7
commit
473eda795a
1 changed files with 18 additions and 1 deletions
|
@ -1,7 +1,24 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; email/notmuch/packages.el
|
;;; email/notmuch/packages.el
|
||||||
|
|
||||||
(package! notmuch :pin "63413a5563450bdedee4c077f2f998578e75083a")
|
(package! notmuch
|
||||||
|
:recipe (:pre-build
|
||||||
|
(with-temp-file "emacs/notmuch-version.el"
|
||||||
|
(insert-file-contents "emacs/notmuch-version.el.tmpl")
|
||||||
|
(re-search-forward "%VERSION%")
|
||||||
|
(replace-match
|
||||||
|
(format "\"%s+%s~%.7s\""
|
||||||
|
(with-temp-buffer (insert-file-contents "version.txt")
|
||||||
|
(string-trim (buffer-string)))
|
||||||
|
(save-match-data
|
||||||
|
(let ((desc (doom-call-process "git" "describe" "--abbrev=7" "--match" "[0-9.]*")))
|
||||||
|
(if (zerop (car desc))
|
||||||
|
(car (last (split-string (cdr desc) "-") 2))
|
||||||
|
"??")))
|
||||||
|
(cdr (doom-call-process "git" "rev-parse" "HEAD")))
|
||||||
|
t t)))
|
||||||
|
:pin "63413a5563450bdedee4c077f2f998578e75083a")
|
||||||
|
|
||||||
(when (featurep! +org)
|
(when (featurep! +org)
|
||||||
(package! org-mime :pin "eb21c02ba8f97fe69c14dc657a7883b982664649"))
|
(package! org-mime :pin "eb21c02ba8f97fe69c14dc657a7883b982664649"))
|
||||||
(when (featurep! :completion ivy)
|
(when (featurep! :completion ivy)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue