[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: emacs-telega: Properly install alists.

From: guix-commits
Subject: 03/03: gnu: emacs-telega: Properly install alists.
Date: Fri, 6 Dec 2019 17:28:32 -0500 (EST)

brettgilio pushed a commit to branch master
in repository guix.

commit 1b3fa123ea50f1dae3a9c8e986c3f6b3bb477314
Author: Leo Prikler <address@hidden>
Date:   Thu Dec 5 23:55:09 2019 +0100

    gnu: emacs-telega: Properly install alists.
    Am Donnerstag, den 05.12.2019, 12:46 -0600 schrieb Brett Gilio:
    > That is why I made the note about eventually replacing the
    > installation of that directory to use the system usually used by
    > `emacs-build-system` because I figure this would cause less issues in
    > the future if for some reason the emacs site-lisp directory structure
    > were to change again.
    > --8<---------------cut here---------------start------------->8---
    > ;; TODO: Replace with `#:include' method used by
    > ;; emacs-build-system.
    > --8<---------------cut here---------------end--------------->8---
    > But I don't think it is a pressing issue to do it so cleanly.
    > Or maybe it is. Idk.
    Perhaps you're right, but as far as I can see the Emacs build system
    does not yet tell us how to proceed with data.  It also has a unique
    way of handling documentation, first putting it into site-lisp before
    moving it to share/info where it should belong.
    > > I still don't feel comfortable with data being at the top of site-
    > > lisp,
    > > though.  Perhaps something similar to emacs-yasnippet-snippets,
    > > where
    > > you store the data in share/emacs/telega-data would be more
    > > appropriate.
    > I was ACTUALLY going to do it this way originally, but I was really
    > uncertain of it so I just sent the patch as is. I like the idea more,
    > so
    > I am going to revise the patch. Otherwise, once I get this revision
    > in
    > everything should be good to go. I'll also substitute the functions
    > to
    > reflect that changed path.
    > [...]
    > Alright, carry on! Patch will be available soon.
    Looking at your revised patch, I still feel a bit uneasy about putting
    data into the load-path.  I therefore proprose a revised revised (R^2,
    if you will) patch, which I've attached to this message.
    From 59918d4a486c453463e6c59487047177f3b54205 Mon Sep 17 00:00:00 2001
    From: Brett Gilio <address@hidden>
    Date: Thu, 5 Dec 2019 13:51:14 -0600
    Subject: [PATCH 3/3] gnu: emacs-telega: Install telega-data to site-lisp.
    * gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: This commit revises 
      previous patch and gives the source etc/ directory a unique installation 
      in the site-lisp directory stucture.
    Co-authored-by: Leo Prikler <address@hidden>
    Signed-off-by: Brett Gilio <address@hidden>
 gnu/packages/emacs-xyz.scm | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e17bdf6..3a3a39d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19989,6 +19989,16 @@ fish-completion.  It can be used in both Eshell and 
M-x shell.")
+           ;; Modify telega-util to reflect unique dir name in
+           ;; `telega-install-data' phase.
+           (add-after 'unpack 'telega-data-patch
+             (lambda _
+               (substitute* "telega-util.el"
+                 (("\\(concat \"etc/\" filename\\) telega--lib-directory")
+                  "(concat \"telega-data/\" filename)
+                    (locate-dominating-file telega--lib-directory
+                                            \"telega-data\")"))
+               #t))
            ;; The telega test suite checks for a version of Emacs
            ;; compiled with imagemagick and svg support. Since we
            ;; are using `emacs-minimal`, this step will fail.
@@ -20019,11 +20029,20 @@ fish-completion.  It can be used in both Eshell and 
M-x shell.")
            ;; Build emacs-side using `emacs-build-system'
            (add-after 'compress-documentation 'emacs-add-source-to-load-path
              (assoc-ref emacs:%standard-phases 'add-source-to-load-path))
-           (add-after 'emacs-set-emacs-load-path 'emacs-install
+           (add-after 'emacs-add-source-to-load-path 'emacs-install
              (assoc-ref emacs:%standard-phases 'install))
-           (add-after 'emacs-install 'emacs-build
+           ;; This step installs subdir /etc, which contains images, sounds and
+           ;; various other data, next to the site-lisp dir.
+           (add-after 'emacs-install 'telega-install-data
+             (lambda* (#:key outputs #:allow-other-keys)
+               (copy-recursively
+                "etc"
+                (string-append (assoc-ref outputs "out")
+                               "/share/emacs/telega-data/"))
+               #t))
+           (add-after 'telega-install-data 'emacs-build
              (assoc-ref emacs:%standard-phases 'build))
-           (add-after 'emacs-install 'emacs-make-autoloads
+           (add-after 'emacs-build 'emacs-make-autoloads
              (assoc-ref emacs:%standard-phases 'make-autoloads)))))
        `(("emacs-visual-fill-column" ,emacs-visual-fill-column)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]