From ad8b83bda052a12077d5da4c3c9b3d3d0911025a Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Fri, 9 Oct 2015 16:45:24 +0300 Subject: emacs: Add 'guix-devel-build-package-source'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Courtès . * guix/scripts.scm (build-package-source): New procedure. * emacs/guix-devel.el (guix-devel-build-package-source): New command. (guix-devel-keys-map): Add key binding for it. * doc/emacs.texi (Emacs Development): Document it. --- emacs/guix-devel.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'emacs') diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el index 547044f8af..b8330289c5 100644 --- a/emacs/guix-devel.el +++ b/emacs/guix-devel.el @@ -122,6 +122,21 @@ run BODY." guix-use-substitutes) "#:dry-run?" (guix-guile-boolean guix-dry-run))))))) +(defun guix-devel-build-package-source () + "Build the source of the current package definition." + (interactive) + (guix-devel-with-definition def + (when (or (not guix-operation-confirm) + (guix-operation-prompt + (format "Build '%s' package source?" def))) + (guix-geiser-eval-in-repl + (concat ",run-in-store " + (guix-guile-make-call-expression + "build-package-source" def + "#:use-substitutes?" (guix-guile-boolean + guix-use-substitutes) + "#:dry-run?" (guix-guile-boolean guix-dry-run))))))) + (defun guix-devel-lint-package () "Check the current package. See Info node `(guix) Invoking guix lint' for details." @@ -177,6 +192,7 @@ to find 'modify-phases' keywords." (defvar guix-devel-keys-map (let ((map (make-sparse-keymap))) (define-key map (kbd "b") 'guix-devel-build-package-definition) + (define-key map (kbd "s") 'guix-devel-build-package-source) (define-key map (kbd "l") 'guix-devel-lint-package) (define-key map (kbd "k") 'guix-devel-copy-module-as-kill) (define-key map (kbd "u") 'guix-devel-use-module) -- cgit 1.4.1