From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH] gnu: guix: Set 'guix-dot-program' emacs variable. Date: Thu, 15 Oct 2015 22:48:06 +0300 Message-ID: <877fmnkj61.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmoVS-00035R-Q5 for guix-devel@gnu.org; Thu, 15 Oct 2015 15:48:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmoVR-0008Le-OS for guix-devel@gnu.org; Thu, 15 Oct 2015 15:48:06 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:36362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmoVR-0008LJ-HY for guix-devel@gnu.org; Thu, 15 Oct 2015 15:48:05 -0400 Received: by lfeh64 with SMTP id h64so43303886lfe.3 for ; Thu, 15 Oct 2015 12:48:04 -0700 (PDT) Received: from leviafan ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id j189sm2290193lfg.48.2015.10.15.12.48.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 12:48:04 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable What about modifying =E2=80=98guix=E2=80=99 package to make various "View g= raph" actions in "M-x guix" work by default (without installing graphviz)? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-guix-Set-guix-dot-program-emacs-variable.patch >From fb077a89b89bb255b464fa21d4f1e715f86239bf Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 15 Oct 2015 20:57:20 +0300 Subject: [PATCH] gnu: guix: Set 'guix-dot-program' emacs variable. * gnu/packages/package-management.scm (guix-devel)[arguments]: Add 'patch-exec-paths' phase to set 'guix-dot-program' emacs variable. --- gnu/packages/package-management.scm | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 8fbe5b3..08a72c5 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -189,18 +189,31 @@ the Nix package manager.") "1zgjj5knpz3qbbqdjm4yh436bzfgasc6p0k3xnx58hfjd88mdsga")) (file-name (string-append "guix-" version "-checkout")))) (arguments - (substitute-keyword-arguments (package-arguments guix-0.8.3) - ((#:phases phases) - `(modify-phases ,phases - (add-after - 'unpack 'bootstrap - (lambda _ - ;; Make sure 'msgmerge' can modify the PO files. - (for-each (lambda (po) - (chmod po #o666)) - (find-files "." "\\.po$")) - - (zero? (system* "sh" "bootstrap")))))))) + (let ((args `(#:modules ((guix build gnu-build-system) + (guix build utils) + (guix build emacs-utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build emacs-utils)) + ,@(package-arguments guix-0.8.3)))) + (substitute-keyword-arguments args + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'bootstrap + (lambda _ + ;; Make sure 'msgmerge' can modify the PO files. + (for-each (lambda (po) + (chmod po #o666)) + (find-files "." "\\.po$")) + (zero? (system* "sh" "bootstrap")))) + (add-before 'build 'patch-exec-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((graphviz (assoc-ref inputs "graphviz")) + (file "emacs/guix-external.el")) + (chmod file #o644) + (emacs-substitute-variables file + ("guix-dot-program" (string-append graphviz + "/bin/dot"))) + #t)))))))) (native-inputs `(("autoconf" ,(autoconf-wrapper)) ("automake" ,automake) -- 2.5.0 --=-=-=--