(define-public emacs-ess (package (name "emacs-ess") (version "20200905.1022") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/emacs-ess/ESS") (commit "82cd308ae54a6b918bbceb235e6bf02f53e48e19"))) (sha256 (base32 "0zw6j8jzrdmy41g6313js7c0xlmc2wmiazx4d4wm6hdvykn8q39k")) (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet '(begin ;; Stop ESS from trying to bundle an external julia-mode.el. (substitute* "lisp/Makefile" (("JULIAS := julia-mode.el julia-mode-latexsubs.el") "JULIAS =")) (substitute* "Makefile" (("$(MAKE) julia-mode.el") "")) (substitute* "test/Makefile" (("lisp: julia") "lisp:")) ;; It looks like this test misses a paste (substitute* "test/ess-test-r.el" (("\\(ert-deftest ess-test-r-help-mode \\(\\)") "(ert-deftest ess-test-r-help-mode () (skip-unless (not noninteractive))")) ;; Include *.el files in install target. (substitute* "lisp/Makefile" (("\t\\$\\(INSTALL) \\$\\(ELC\\) \\$\\(LISPDIR\\)" elc) (string-append "\t$(INSTALL) $(ELS) ess-autoloads.el " "$(LISPDIR)\n" elc))) ;; Only build docs in info format. (substitute* "doc/Makefile" (("all : info text") "all : info") (("install: install-info install-other-docs") "install: install-info")) ;; Stop install-info from trying to update the info directory. (substitute* "doc/Makefile" ((".*\\$\\(INFODIR\\)/dir.*") "")) #t)))) (build-system gnu-build-system) (arguments (let ((base-directory "/share/emacs/site-lisp")) `(#:make-flags (list (string-append "PREFIX=" %output) (string-append "ETCDIR=" %output ,base-directory "/etc") (string-append "LISPDIR=" %output ,base-directory)) #:phases (modify-phases %standard-phases (delete 'configure) (add-before 'build 'more-shebang-patching (lambda* (#:key inputs #:allow-other-keys) (substitute* "Makeconf" (("SHELL = /bin/sh") (string-append "SHELL = " (which "sh")))) #t)) (replace 'check (lambda _ (invoke "make" "test"))))))) (inputs `(("emacs" ,emacs-minimal) ("r-minimal" ,r-minimal))) (native-inputs `(("perl" ,perl) ("r-roxygen2" ,r-roxygen2) ("texinfo" ,texinfo))) (propagated-inputs `(("emacs-julia-mode" ,emacs-julia-mode))) (home-page "https://ess.r-project.org/") (synopsis "Emacs mode for statistical analysis programs") (description "Emacs Speaks Statistics (ESS) is an add-on package for GNU Emacs. It is designed to support editing of scripts and interaction with various statistical analysis programs such as R, Julia, and JAGS.") (license license:gpl3+)))