gnu: emacs-elpy: Fix build.

Fixes <https://issues.guix.gnu.org/46516>, which was caused by commit
41abf3b3a0.

* gnu/packages/emacs-xyz.scm (emacs-elpy)[phases]
{patch-ffip-project-search-call}: New phase.

Reported-by: Simon Streit <simon@netpanic.org> and others.
This commit is contained in:
Maxim Cournoyer 2021-02-18 13:26:59 -05:00
parent 13de685877
commit 5fccdbc079
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -9166,6 +9166,15 @@ (define-public emacs-elpy
`(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-ffip-project-search-call
(lambda _
;; Since version 6.0.0 of find-file-in-project,
;; ffip-project-search doesn't accept a third argument anymore
;; (see: https://github.com/jorgenschaefer/elpy/issues/1889).
(substitute* "elpy.el"
(("\\((ffip-project-search nil nil) project-root\\)" _ signature)
(format #f "(let ((ffip-project-root project-root)) (~a))"
signature)))))
;; The default environment of the RPC uses Virtualenv to install
;; Python dependencies from PyPI. We don't want/need this in Guix.
(add-before 'check 'do-not-use-virtualenv