From ba9e9f14e83bd0467db22dd19c562916bd9418ab Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 12 Feb 2018 22:10:31 -0500 Subject: [PATCH 9/9] gnu: Add emacs-elpy. * gnu/packages/emacs.scm (emacs-elpy): New variable. --- gnu/packages/emacs.scm | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 797e747fb..372f72dab 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4525,6 +4525,64 @@ indentation (space indentation only). @end enumerate") (license license:gpl2+))) +(define-public emacs-elpy + (package + (name "emacs-elpy") + (version "1.23.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jorgenschaefer/elpy.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0dy18lyvpgr8vi2a7r13i8bn6k3b12z4l8hx0y80sh3mnakvs14n")))) + (build-system emacs-build-system) + (arguments + `(#:include (cons* "^elpy\\/" "^snippets\\/" %default-include) + #:phases + ;; TODO: Make `elpy-config' display Guix commands :) + (modify-phases %standard-phases + ;; One elpy test depends on being run inside a Python virtual + ;; environment to pass. We have nothing to gain from doing so here, + ;; so we just trick Elpy into thinking we are (see: + ;; https://github.com/jorgenschaefer/elpy/pull/1293). + (add-before 'check 'fake-virtualenv + (lambda _ + (setenv "VIRTUAL_ENV" "/tmp"))) + ;; TODO: Remove after next release (see: + ;; https://github.com/jorgenschaefer/elpy/pull/1293). + (add-after 'unpack 'fix-broken-test + (lambda _ + (substitute* "test/elpy-config-test.el" + (("python-check-command") "elpy-syntax-check-command"))))) + #:tests? #t + #:test-command '("ert-runner"))) + (propagated-inputs + `(("emacs-company" ,emacs-company) + ("emacs-find-file-in-project" ,emacs-find-file-in-project) + ("emacs-highlight-indentation" ,emacs-highlight-indentation) + ("emacs-yasnippet" ,emacs-yasnippet) + ("pyvenv" ,emacs-pyvenv) + ("s" ,emacs-s))) + (native-inputs + ;; TODO: Generate texinfo documentation. + `(("ert-runner" ,ert-runner) + ("emacs-f" ,emacs-f) + ("python" ,python-wrapper) + ("python-autopep8" ,python-autopep8) + ("python-black" ,python-black) + ("python-flake8" ,python-flake8) + ("python-jedi" ,python-jedi) + ("python-yapf" ,python-yapf))) + (home-page "https://github.com/jorgenschaefer/elpy") + (synopsis "Python development environment for Emacs") + (description "Elpy brings powerful Python editing to Emacs. It combines +and configures a number of other packages written in Emacs Lisp as well +as Python.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0