1
0
Fork 0

oni-core: Replace package definition with updated hash

This commit is contained in:
Tom Willemse 2025-01-30 15:57:52 -08:00
parent 56076c28e1
commit d9d228d1b1

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; 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)
;; 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 ()
"Try and find the last actual hash in the compilation buffer and insert it."
(interactive)
(insert
(with-current-buffer next-error-last-buffer
(let* ((hash (with-current-buffer next-error-last-buffer
(save-excursion
(save-match-data
(goto-char (point-max))
(re-search-backward (rx bol (zero-or-more whitespace) "actual hash:" (one-or-more whitespace)))
(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)
(setq safe-local-variable-directories