mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-16 19:57:39 -05:00
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.
This commit is contained in:
parent
9368341092
commit
2a97acbe3d
1 changed files with 13 additions and 10 deletions
|
@ -906,17 +906,16 @@ (define-public emacs-magit
|
||||||
;; the root of the project for the emacs-build-system.
|
;; the root of the project for the emacs-build-system.
|
||||||
(for-each (lambda (f)
|
(for-each (lambda (f)
|
||||||
(install-file f "lisp"))
|
(install-file f "lisp"))
|
||||||
(find-files "Documentation" "\\.info$"))
|
(find-files "Documentation" "\\.info$"))))
|
||||||
(chdir "lisp")))
|
|
||||||
(add-after 'build-info-manual 'set-magit-version
|
(add-after 'build-info-manual 'set-magit-version
|
||||||
(lambda _
|
(lambda _
|
||||||
(make-file-writable "magit.el")
|
(make-file-writable "lisp/magit.el")
|
||||||
(emacs-substitute-variables "magit.el"
|
(emacs-substitute-variables "lisp/magit.el"
|
||||||
("magit-version" #$version))))
|
("magit-version" #$version))))
|
||||||
(add-after 'set-magit-version 'patch-exec-paths
|
(add-after 'set-magit-version 'patch-exec-paths
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(make-file-writable "magit-sequence.el")
|
(make-file-writable "lisp/magit-sequence.el")
|
||||||
(emacs-substitute-variables "magit-sequence.el"
|
(emacs-substitute-variables "lisp/magit-sequence.el"
|
||||||
("magit-perl-executable"
|
("magit-perl-executable"
|
||||||
(search-input-file inputs "/bin/perl")))))
|
(search-input-file inputs "/bin/perl")))))
|
||||||
(add-before 'check 'configure-git
|
(add-before 'check 'configure-git
|
||||||
|
@ -932,13 +931,17 @@ (define-public emacs-magit
|
||||||
;; There is an issue causing TRAMP to fail in the build
|
;; There is an issue causing TRAMP to fail in the build
|
||||||
;; environment. Setting the tramp-remote-shell parameter of
|
;; environment. Setting the tramp-remote-shell parameter of
|
||||||
;; the sudo-method to the file name of the shell didn't help.
|
;; the sudo-method to the file name of the shell didn't help.
|
||||||
(chdir "..")
|
|
||||||
(substitute* "t/magit-tests.el"
|
(substitute* "t/magit-tests.el"
|
||||||
(("^\\(ert-deftest magit-toplevel:tramp.*" all)
|
(("^\\(ert-deftest magit-toplevel:tramp.*" all)
|
||||||
(string-append all " (skip-unless nil)")))))
|
(string-append all " (skip-unless nil)")))))
|
||||||
(add-before 'install 'enter-lisp-directory
|
(replace 'expand-load-path
|
||||||
(lambda _
|
(lambda args
|
||||||
(chdir "lisp"))))))
|
(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
|
(native-inputs
|
||||||
(list texinfo))
|
(list texinfo))
|
||||||
(inputs
|
(inputs
|
||||||
|
|
Loading…
Reference in a new issue