oni-core: Replace package definition with updated hash
This commit is contained in:
parent
56076c28e1
commit
d9d228d1b1
1 changed files with 22 additions and 9 deletions
21
oni-core.el
21
oni-core.el
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2025.0102.153327
|
;; Version: 2025.0130.155651
|
||||||
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
|
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -517,14 +517,27 @@ which normally have their errors suppressed."
|
||||||
(defun oni-core-copy-guix-build-hash ()
|
(defun oni-core-copy-guix-build-hash ()
|
||||||
"Try and find the last actual hash in the compilation buffer and insert it."
|
"Try and find the last actual hash in the compilation buffer and insert it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(insert
|
(let* ((hash (with-current-buffer next-error-last-buffer
|
||||||
(with-current-buffer next-error-last-buffer
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(re-search-backward (rx bol (zero-or-more whitespace) "actual hash:" (one-or-more whitespace)))
|
(re-search-backward (rx bol (zero-or-more whitespace) "actual hash:" (one-or-more whitespace)))
|
||||||
(goto-char (match-end 0))
|
(goto-char (match-end 0))
|
||||||
(buffer-substring-no-properties (point) (line-end-position)))))))
|
(buffer-substring-no-properties (point) (line-end-position))))))
|
||||||
|
(struct (let ((obj (save-excursion
|
||||||
|
(beginning-of-defun)
|
||||||
|
(read (current-buffer)))))
|
||||||
|
(setf (cadar (map-elt (cdar (map-elt (cdadr (cdaddr obj)) 'source)) 'sha256))
|
||||||
|
hash)
|
||||||
|
obj)))
|
||||||
|
(beginning-of-defun)
|
||||||
|
(let ((start (point)))
|
||||||
|
(forward-sexp)
|
||||||
|
(delete-region start (point))
|
||||||
|
(insert (pp struct))
|
||||||
|
(indent-region start (point))
|
||||||
|
(skip-syntax-forward "> ")
|
||||||
|
(ensure-empty-lines))))
|
||||||
|
|
||||||
(if (boundp 'safe-local-variable-directories)
|
(if (boundp 'safe-local-variable-directories)
|
||||||
(setq safe-local-variable-directories
|
(setq safe-local-variable-directories
|
||||||
|
|
Loading…
Reference in a new issue