diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2020-01-07 02:26:22 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2020-01-07 03:11:58 +0300 |
commit | c4970c53a6f9ce1b1d54c0bd59d62a4507f55b5b (patch) | |
tree | 49456c2b196abeec828d75dbe205925c7a10cc89 /gnu/packages/emacs-xyz.scm | |
parent | 90a31c73b377dde99cadbf577c66f00649260952 (diff) | |
download | guix-c4970c53a6f9ce1b1d54c0bd59d62a4507f55b5b.tar.gz |
gnu: emacs-treemacs: Install icons and scripts.
Reported by Christopher Howard <christopher@alaskasi.com>. * gnu/packages/emacs-xyz.scm (emacs-treemacs)[inputs]: Add 'python'. [arguments]: Add 'patch-paths' and 'install-data' phases.
Diffstat (limited to 'gnu/packages/emacs-xyz.scm')
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 12bf9accc1..067aee230c 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.") |