me
/
guix
Archived
1
0
Fork 0

gnu: emacs: Patch references to /bin/sh.

When attempting to run ert-runner in the build side environment where /bin/sh
doesn't exist as part of the emacs-elpy test suite, Emacs was throwing the
error "Searching for program: No such file or directory, /bin/sh".  This is
because the default shell when SHELL is not set was "/bin/sh", as can be seen
in callproc.c:

  sh = getenv ("SHELL");
  Vshell_file_name = build_string (sh ? sh : "/bin/sh");

Thus, patch the occurrences of "/bin/sh" in the source files of Emacs to refer
to their correct store location.

* gnu/packages/emacs.scm (emacs)[phases]{patch-program-file-names}: Add phase.
master
Maxim Cournoyer 2020-03-21 23:16:08 -04:00
parent 393c5e6928
commit 4cbd60698d
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 10 additions and 0 deletions

View File

@ -131,6 +131,16 @@
"--disable-build-details") "--disable-build-details")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch-program-file-names
(lambda _
(substitute* '("src/callproc.c"
"lisp/term.el"
"lisp/htmlfontify.el"
"lisp/textmodes/artist.el"
"lisp/progmodes/sh-script.el")
(("\"/bin/sh\"")
(format "~s" (which "sh"))))
#t))
(add-before 'configure 'fix-/bin/pwd (add-before 'configure 'fix-/bin/pwd
(lambda _ (lambda _
;; Use `pwd', not `/bin/pwd'. ;; Use `pwd', not `/bin/pwd'.