diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-06-22 13:23:28 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-06-22 13:29:02 -0400 |
commit | 299be00adb427441c0cb7d301bf918594f61400e (patch) | |
tree | 03b8e63c396bf165c5957827dba78f922111bcac /gnu | |
parent | d798e0a111e507ddc47d3c9b8c6775b765b3fbc4 (diff) |
gnu: emacs-jedi: Install and patch location of jediepcserver.
* gnu/packages/emacs-xyz.scm (emacs-jedi)[arguments]: New field.
[native-inputs]: Add python-wrapper.
[inputs]: New field.
Reported-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 35 |
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") |