guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: emacs-treemacs: Install icons and scripts.


From: guix-commits
Subject: branch master updated: gnu: emacs-treemacs: Install icons and scripts.
Date: Mon, 06 Jan 2020 19:14:07 -0500

This is an automated email from the git hooks/post-receive script.

wigust pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new c4970c5  gnu: emacs-treemacs: Install icons and scripts.
c4970c5 is described below

commit c4970c53a6f9ce1b1d54c0bd59d62a4507f55b5b
Author: Oleg Pykhalov <address@hidden>
AuthorDate: Tue Jan 7 02:26:22 2020 +0300

    gnu: emacs-treemacs: Install icons and scripts.
    
    Reported by Christopher Howard <address@hidden>.
    
    * gnu/packages/emacs-xyz.scm (emacs-treemacs)[inputs]: Add 'python'.
    [arguments]: Add 'patch-paths' and 'install-data' phases.
---
 gnu/packages/emacs-xyz.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 12bf9ac..067aee2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17804,6 +17804,8 @@ processes for Emacs")
     (native-inputs
      `(("emacs-buttercup" ,emacs-buttercup)
        ("emacs-el-mock" ,emacs-el-mock)))
+    (inputs
+     `(("python" ,python)))
     (arguments
      `(#:tests? #t ;TODO: Investigate ‘treemacs--parse-collapsed-dirs’ test 
failure.
        #:phases
@@ -17824,7 +17826,35 @@ processes for Emacs")
                (emacs-substitute-sexps "test/test-treemacs.el"
                  ("(describe \"treemacs--parse-collapsed-dirs\""
                   ""))
-               (invoke "make" "test")))))))
+               (invoke "make" "test"))))
+         (add-before 'install 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (with-directory-excursion "../.." ;treemacs root
+               (chmod "src/elisp/treemacs-core-utils.el" #o644)
+               (emacs-substitute-variables "src/elisp/treemacs-core-utils.el"
+                 ("treemacs-dir"
+                  (string-append (assoc-ref outputs "out") "/")))
+               (chmod "src/elisp/treemacs-icons.el" #o644)
+               (substitute* "src/elisp/treemacs-icons.el"
+                 (("icons/default") "share/emacs-treemacs/images"))
+               (chmod "src/elisp/treemacs-customization.el" #o644)
+               (emacs-substitute-variables 
"src/elisp/treemacs-customization.el"
+                 ("treemacs-python-executable"
+                  (string-append (assoc-ref inputs "python") "/bin/python3")))
+               (chmod "src/elisp/treemacs-async.el" #o644)
+               (substitute* "src/elisp/treemacs-async.el"
+                 (("src/scripts") (string-append "share/" ,name "/scripts"))))
+             #t))
+         (add-after 'install 'install-data
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((images (string-append (assoc-ref outputs "out")
+                                          "/share/" ,name "/images")))
+               (with-directory-excursion "../.." ;treemacs root
+                 (copy-recursively "icons/default" images)
+                 (copy-recursively "src/scripts"
+                                   (string-append (assoc-ref outputs "out")
+                                                  "/share/" ,name "/scripts"))
+                 #t)))))))
     (home-page "https://github.com/Alexander-Miller/treemacs";)
     (synopsis "Emacs tree style file explorer")
     (description "Powerful and flexible file tree project explorer.")



reply via email to

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