aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/emacs-xyz.scm35
1 files changed, 33 insertions, 2 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 5779c02c8d..d27f79a7a9 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -7833,8 +7833,39 @@ using @code{python-isort}.")
(base32
"1bckxppfzd5gwn0aw4h86igb7igal9axqncq7j8zmflg7zppncf1"))))
(build-system emacs-build-system)
- (native-inputs
- (list emacs-mocker))
+ (arguments
+ (list
+ #:imported-modules `(,@%emacs-build-system-modules
+ (guix build python-build-system))
+ #:modules '((guix build emacs-build-system)
+ ((guix build python-build-system) #:prefix python:)
+ (guix build emacs-utils)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'ensure-no-mtimes-pre-1980
+ (assoc-ref python:%standard-phases
+ 'ensure-no-mtimes-pre-1980))
+ (add-after 'ensure-no-mtimes-pre-1980 'relax-python-requirements
+ (lambda _
+ ;; Argparse should only be required for Python < 3.2
+ ;; (see: https://github.com/tkf/emacs-jedi/issues/365).
+ (substitute* "setup.py"
+ ((".*argparse.*") ""))))
+ (add-after 'relax-python-requirements 'python:add-install-to-pythonpath
+ (assoc-ref python:%standard-phases 'add-install-to-pythonpath))
+ (add-after 'python:add-install-to-pythonpath 'python:install
+ ;; This is needed to get the Python-built 'jediepcserver' command.
+ (assoc-ref python:%standard-phases 'install))
+ (add-after 'python:install 'python:wrap
+ (assoc-ref python:%standard-phases 'wrap))
+ (add-after 'python:wrap 'patch-jedi:server-command
+ (lambda* (#:key outputs #:allow-other-keys)
+ (emacs-substitute-variables "jedi-core.el"
+ ("jedi:server-command"
+ (search-input-file outputs "bin/jediepcserver"))))))))
+ (native-inputs (list emacs-mocker python-wrapper))
+ (inputs (list python-wrapper python-epc python-jedi)) ;wrapped
(propagated-inputs
(list emacs-auto-complete emacs-python-environment emacs-epc))
(home-page "https://github.com/tkf/emacs-jedi")