diff options
Diffstat (limited to 'gnu/packages/emacs-xyz.scm')
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 247 |
1 files changed, 122 insertions, 125 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9b262a6d66..be46389319 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -308,7 +308,7 @@ e.g. emacs-geiser-guile for Guile.") (string-append "(eval-after-load 'geiser-impl '" all ")")))))))) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (propagated-inputs `(("geiser" ,emacs-geiser))) (home-page "https://nongnu.org/geiser/") @@ -534,8 +534,7 @@ system.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "hypb.el" (("/bin/domainname") - (string-append (assoc-ref inputs "inetutils") - "/bin/dnsdomainname"))) + (search-input-file inputs "bin/dnsdomainname"))) (substitute* "hyperbole.el" (("\\(hyperb:check-dir-user\\)") "")))) (add-after 'install 'install-images @@ -744,14 +743,12 @@ on stdout instead of using a socket as the Emacsclient does.") (make-file-writable "libgit.el") (emacs-substitute-variables "libgit.el" ("libgit--module-file" - (string-append (emacs:elpa-directory out) "/libegit2.so"))) - #t))) + (string-append (emacs:elpa-directory out) "/libegit2.so")))))) (add-before 'install 'prepare-for-install (lambda _ - (let ((s (string-append "../" ,name "-" ,version "-checkout"))) + (let ((s "../source")) (copy-file "libegit2.so" (string-append s "/libegit2.so")) - (chdir s) - #t))) + (chdir s)))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((install (assoc-ref emacs:%standard-phases 'install))) @@ -1456,7 +1453,7 @@ replacement.") ((f1 f2 ...) (dirname f1)) (_ ""))) - (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh"))) + (let ((sh (search-input-file inputs "/bin/sh"))) (define emacs-prefix? (cut string-prefix? "emacs-" <>)) (setenv "SHELL" "sh") @@ -2666,7 +2663,7 @@ as a library for other Emacs packages.") (lambda* (#:key inputs #:allow-other-keys) (emacs-substitute-variables "preview.el" ("preview-gs-command" - (string-append (assoc-ref inputs "ghostscript") "/bin/gs"))) + (search-input-file inputs "/bin/gs"))) (substitute* "preview.el" (("\"dvipng ") (string-append "\"" (assoc-ref inputs "texlive") @@ -2692,7 +2689,7 @@ as a library for other Emacs packages.") `(("perl" ,perl))) (inputs `(("ghostscript" ,ghostscript) - ("texlive" ,(texlive-union (list texlive-amsfonts/patched))))) + ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts))))) (home-page "https://www.gnu.org/software/auctex/") (synopsis "Integrated environment for TeX") (description @@ -3069,8 +3066,7 @@ into mode hooks and is intended to be used that way.") (chmod "ggtags.el" #o644) (emacs-substitute-variables "ggtags.el" ("ggtags-executable-directory" - (string-append (assoc-ref inputs "global") "/bin"))) - #t))))) + (dirname (search-input-file inputs "bin/global"))))))))) (home-page "https://github.com/leoliu/ggtags") (synopsis "Frontend to the GNU Global source code tagging system") (description "@code{ggtags} provides a frontend to the GNU Global source @@ -3176,7 +3172,7 @@ directly inside Emacs. It requires a Google Map Static API key to function.") (with-directory-excursion "texinfo" (substitute* "Makefile" (("\\/usr\\/bin\\/gzip") - (string-append (assoc-ref inputs "gzip") "/bin/gzip"))) + (search-input-file inputs "/bin/gzip"))) (invoke "make" "clean" "info" @@ -5700,8 +5696,7 @@ for Flow files.") (add-after 'unpack 'specify-python-location ;; Hard-code python3 executable location in the library. (lambda* (#:key inputs #:allow-other-keys) - (let ((python3 (string-append (assoc-ref inputs "python") - "/bin/python3"))) + (let ((python3 (search-input-file inputs "/bin/python3"))) (substitute* '("flycheck-grammalecte.el" "grammalecte.el") (("\"python3") (string-append "\"" python3))) (substitute* '("conjugueur.py" "flycheck_grammalecte.py") @@ -5712,10 +5707,11 @@ for Flow files.") (make-file-writable "grammalecte.el") (emacs-substitute-variables "grammalecte.el" ("grammalecte-python-package-directory" - (string-append (assoc-ref inputs "grammalecte") - "/lib/python" - ,(version-major+minor (package-version python)) - "/site-packages/grammalecte"))))) + (search-input-directory + inputs + (string-append "lib/python" + ,(version-major+minor (package-version python)) + "/site-packages/grammalecte")))))) (add-after 'unpack 'do-not-phone-home ;; Do not check for Grammalecte updates, ever. (lambda _ @@ -9583,9 +9579,7 @@ queries using counsel.") (make-file-writable "counsel-notmuch.el") (emacs-substitute-variables "counsel-notmuch.el" ("counsel-notmuch-path" - (string-append (assoc-ref inputs "notmuch") - "/bin/notmuch"))) - #t))))) + (search-input-file inputs "/bin/notmuch")))))))) (inputs `(("emacs-counsel" ,emacs-counsel) ("notmuch" ,notmuch) @@ -10571,86 +10565,94 @@ indentation guides in Emacs: (license license:gpl2+)))) (define-public emacs-elpy - (package - (name "emacs-elpy") - (version "1.35.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/jorgenschaefer/elpy") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "07rdb9w3bxzfr07224awa541xdy116hyc2b3bpl3fc3ikddmbydk")))) - (build-system emacs-build-system) - (arguments - `(#: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 - (lambda _ - (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1") - (substitute* "elpy-rpc.el" - (("defcustom elpy-rpc-virtualenv-path 'default") - "defcustom elpy-rpc-virtualenv-path 'system")))) - (add-before 'check 'build-doc - (lambda _ - (with-directory-excursion "docs" - (invoke "make" "info" "man")) - ;; Move .info file at the root so that it can installed by the - ;; 'move-doc phase. - (rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info"))) - (add-after 'build-doc 'install-manpage - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (man1 (string-append out "/share/man/man1"))) - (mkdir-p man1) - (copy-file "docs/_build/man/elpy.1" - (string-append man1 "/elpy.1")))))) - #: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) - ;; The following are recommended Python dependencies that make Elpy - ;; much more useful. Installing these avoids Elpy prompting to install them - ;; from PyPI using pip. - ("python-autopep8" ,python-autopep8) - ("python-black" ,python-black) - ("python-flake8" ,python-flake8) - ("python-jedi" ,python-jedi) - ("python-rope" ,python-rope) - ("python-yapf" ,python-yapf))) - (native-inputs - `(("ert-runner" ,emacs-ert-runner) - ("emacs-f" ,emacs-f) - ("python" ,python-wrapper) - ;; For documentation. - ("python-sphinx" ,python-sphinx) - ("texinfo" ,texinfo))) - (home-page "https://github.com/jorgenschaefer/elpy") - (synopsis "Python development environment for Emacs") - (description "Elpy brings powerful Python editing to Emacs. It combines + ;; Use the latest commit, as it contains unreleased fixes for Python 3.9 and + ;; Jedi 0.18. + (let ((commit "8d0de310d41ebf06b22321a8534546447456870c") + (revision "0")) + (package + (name "emacs-elpy") + (version (git-version "1.35.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jorgenschaefer/elpy") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0hg6yk0wkfh2rwcc4h0bb6m2p3dg62ja22mjpa94khq52lv1piwf")))) + (build-system emacs-build-system) + (arguments + `(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + ;; Some tests are known to have problems with Python 3.9; disable + ;; them (see: + ;; https://github.com/jorgenschaefer/elpy/issues/1856). + ;; Aggressively remove the modules where failing tests were + ;; discovered, as they are similar and fail in a nondeterministic + ;; way. + (lambda _ + (with-directory-excursion "test" + (for-each delete-file + (append (find-files "." "elpy-refactor") + (find-files "." "elpy-multiedit") + (find-files "." "elpy-pdb") + (find-files "." "elpy-promise")))))) + ;; 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 + (lambda _ + (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1") + (substitute* "elpy-rpc.el" + (("defcustom elpy-rpc-virtualenv-path 'default") + "defcustom elpy-rpc-virtualenv-path 'system")))) + (add-before 'check 'build-doc + (lambda _ + (with-directory-excursion "docs" + (invoke "make" "info" "man")) + ;; Move .info file at the root so that it can installed by the + ;; 'move-doc phase. + (rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info"))) + (add-after 'build-doc 'install-manpage + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man1 (string-append out "/share/man/man1"))) + (mkdir-p man1) + (copy-file "docs/_build/man/elpy.1" + (string-append man1 "/elpy.1")))))) + #: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) + ;; The following are recommended Python dependencies that make Elpy + ;; much more useful. Installing these avoids Elpy prompting to install them + ;; from PyPI using pip. + ("python-autopep8" ,python-autopep8) + ("python-black" ,python-black) + ("python-flake8" ,python-flake8) + ("python-jedi" ,python-jedi) + ("python-yapf" ,python-yapf))) + (native-inputs + `(("ert-runner" ,emacs-ert-runner) + ("emacs-f" ,emacs-f) + ("python" ,python-wrapper) + ;; For documentation. + ("python-sphinx" ,python-sphinx) + ("texinfo" ,texinfo))) + (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, together offering features such as navigation, documentation, completion, interactive development and more.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public emacs-rainbow-delimiters (package @@ -13490,8 +13492,7 @@ highlights quasi-quoted expressions.") (bin (string-append out "/bin")) (lisp (string-append out "/share/emacs/site-lisp/emacspeak")) (info (string-append out "/share/info")) - (emacs (string-append (assoc-ref inputs "emacs") - "/bin/emacs"))) + (emacs (search-input-file inputs "/bin/emacs"))) ;; According to etc/install.org, the Emacspeak directory should ;; be copied to its installation destination. (for-each @@ -14279,10 +14280,10 @@ It should enable you to implement low-level X11 applications.") (format #t "#!~a ~@ ~a +SI:localuser:$USER ~@ exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%" - (string-append (assoc-ref inputs "bash") "/bin/sh") - (string-append (assoc-ref inputs "xhost") "/bin/xhost") - (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch") - (string-append (assoc-ref inputs "emacs") "/bin/emacs") + (search-input-file inputs "/bin/sh") + (search-input-file inputs "/bin/xhost") + (search-input-file inputs "/bin/dbus-launch") + (search-input-file inputs "/bin/emacs") '(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm")) @@ -14395,10 +14396,10 @@ other operations.") (format #t "#!~a ~@ ~a +SI:localuser:$USER ~@ exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%" - (string-append (assoc-ref inputs "bash") "/bin/sh") - (string-append (assoc-ref inputs "xhost") "/bin/xhost") - (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch") - (string-append (assoc-ref inputs "emacs") "/bin/emacs") + (search-input-file inputs "/bin/sh") + (search-input-file inputs "/bin/xhost") + (search-input-file inputs "/bin/dbus-launch") + (search-input-file inputs "/bin/emacs") '(require 'exwmx-loader)))) (chmod exwm-executable #o555) #t)))))) @@ -16626,7 +16627,7 @@ Features: ;; Patch shebangs. (substitute* "epipe" (("/usr/bin/env bash") - (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))) + (search-input-file %build-inputs "/bin/bash"))) (patch-shebang "epipe.pl" (list (string-append (assoc-ref %build-inputs "perl") "/bin"))) @@ -24130,7 +24131,7 @@ processes for Emacs") (chmod "src/elisp/treemacs-customization.el" #o644) (emacs-substitute-variables "src/elisp/treemacs-customization.el" ("treemacs-python-executable" - (string-append (assoc-ref inputs "python") "/bin/python3"))) + (search-input-file inputs "/bin/python3"))) (chmod "src/elisp/treemacs-async.el" #o644) (substitute* "src/elisp/treemacs-async.el" (("src/scripts") (string-append "share/" ,name "/scripts")))))) @@ -27210,14 +27211,14 @@ service, and connect it with Emacs via inter-process communication.") (add-after 'unpack 'patch-sources (lambda* (#:key inputs #:allow-other-keys) ;; Hard-code paths to `ffplay` and `ffmpeg`. - (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) - (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg")) - (ffplay-bin (string-append ffmpeg "/bin/ffplay"))) + (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay")) + (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg"))) (substitute* '("telega-ffplay.el" "telega-vvnote.el") (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)" all func cmd) - (string-append func " \"" (assoc-ref inputs "ffmpeg") - "/bin/" cmd)) + (string-append func " \"" + (search-input-file + inputs (string-append "/bin/" cmd)))) (("\\(executable-find \"ffplay\"\\)") (string-append "(and (file-executable-p \"" ffplay-bin "\")" "\"" ffplay-bin "\")")) @@ -27228,8 +27229,7 @@ service, and connect it with Emacs via inter-process communication.") (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "telega-server.el" (("@TELEGA_SERVER_BIN@") - (string-append (assoc-ref inputs "emacs-telega-server") - "/bin/telega-server"))) + (search-input-file inputs "/bin/telega-server"))) (substitute* "telega-util.el" (("@TELEGA_SHARE@") (string-append (elpa-directory (assoc-ref outputs "out")) @@ -27529,9 +27529,8 @@ REPL appropriate to the current major mode.") (make-file-writable "rime.el") (emacs-substitute-variables "rime.el" ("rime-share-data-dir" - (string-append (assoc-ref inputs "rime-data") - "/share/rime-data"))) - #t)) + (search-input-directory inputs + "share/rime-data"))))) (add-before 'install 'build-emacs-module (lambda _ (invoke "make" "lib")))))) @@ -28523,9 +28522,7 @@ emoji.") (make-file-writable "exiftool.el") (emacs-substitute-variables "exiftool.el" ("exiftool-executable" - (string-append (assoc-ref inputs "perl-image-exiftool") - "/bin/exiftool"))) - #t))))) + (search-input-file inputs "/bin/exiftool")))))))) (inputs `(("perl-image-exiftool" ,perl-image-exiftool))) (home-page "https://git.systemreboot.net/exiftool.el/about/") |