aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-01-30 15:57:52 -0800
committerGravatar Tom Willemse2025-01-30 15:57:52 -0800
commitd9d228d1b1965ecc978c303f0019df0268e2e98d (patch)
tree7157abead042e3351c3680d65bee70d8441e499a
parent56076c28e1dd7288ae074933d4f9f6d723c3bef2 (diff)
downloademacs-config-d9d228d1b1965ecc978c303f0019df0268e2e98d.tar.gz
emacs-config-d9d228d1b1965ecc978c303f0019df0268e2e98d.zip
oni-core: Replace package definition with updated hash
-rw-r--r--oni-core.el31
1 files changed, 22 insertions, 9 deletions
diff --git a/oni-core.el b/oni-core.el
index 9562af9..e1ef818 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -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
- (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)))))))
+ (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))))))
+ (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