[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: emacs-magit: Use directory excursions rather than wild chdir
From: |
guix-commits |
Subject: |
03/03: gnu: emacs-magit: Use directory excursions rather than wild chdir. |
Date: |
Sat, 28 May 2022 02:55:59 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit 2a97acbe3db5d160f97914550ece0d03b44168d4
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Sat May 28 08:49:41 2022 +0200
gnu: emacs-magit: Use directory excursions rather than wild chdir.
* gnu/packages/emacs-xyz.scm (emacs-magit)[#:phases]
<build-info-manual, configure-git>: Don't chdir.
<set-magit-version, patch-exec-paths>: Use full file names.
<enter-lisp-directory>: Drop phase.
<expand-load-path, install>: Wrap in directory excursions.
---
gnu/packages/emacs-xyz.scm | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 665c69a20c..31822dc641 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -906,17 +906,16 @@ libgit2 bindings for Emacs, intended to boost the
performance of Magit.")
;; the root of the project for the emacs-build-system.
(for-each (lambda (f)
(install-file f "lisp"))
- (find-files "Documentation" "\\.info$"))
- (chdir "lisp")))
+ (find-files "Documentation" "\\.info$"))))
(add-after 'build-info-manual 'set-magit-version
(lambda _
- (make-file-writable "magit.el")
- (emacs-substitute-variables "magit.el"
+ (make-file-writable "lisp/magit.el")
+ (emacs-substitute-variables "lisp/magit.el"
("magit-version" #$version))))
(add-after 'set-magit-version 'patch-exec-paths
(lambda* (#:key inputs #:allow-other-keys)
- (make-file-writable "magit-sequence.el")
- (emacs-substitute-variables "magit-sequence.el"
+ (make-file-writable "lisp/magit-sequence.el")
+ (emacs-substitute-variables "lisp/magit-sequence.el"
("magit-perl-executable"
(search-input-file inputs "/bin/perl")))))
(add-before 'check 'configure-git
@@ -932,13 +931,17 @@ libgit2 bindings for Emacs, intended to boost the
performance of Magit.")
;; There is an issue causing TRAMP to fail in the build
;; environment. Setting the tramp-remote-shell parameter of
;; the sudo-method to the file name of the shell didn't help.
- (chdir "..")
(substitute* "t/magit-tests.el"
(("^\\(ert-deftest magit-toplevel:tramp.*" all)
(string-append all " (skip-unless nil)")))))
- (add-before 'install 'enter-lisp-directory
- (lambda _
- (chdir "lisp"))))))
+ (replace 'expand-load-path
+ (lambda args
+ (with-directory-excursion "lisp"
+ (apply (assoc-ref %standard-phases 'expand-load-path) args))))
+ (replace 'install
+ (lambda args
+ (with-directory-excursion "lisp"
+ (apply (assoc-ref %standard-phases 'install) args)))))))
(native-inputs
(list texinfo))
(inputs