Message ID | 87h9c45jlq.fsf@gnu.org |
---|---|
State | New |
Headers | show |
Hi. On 05/07/16 20:56, Roel Janssen wrote: > Dear Guix, > > I have a question about the following patch to add emacs-ess. Thanks, I was also making a half-hearted attempt at this. > By default, the build files rely upon a LaTeX distribution to be > installed to generate a PDF from its Texinfo documentation. > > I know that texlive is quite a heavy package, so should I separate the > output of this package in "out" and "doc", and substitute/patch the > involved Makefiles? Have you tried texlive-minimal ? > You can find the patch below. I didn't find the time to test the patch, but looks fine to me on the face of it. I had it in statistics.scm but I think emacs.scm is fine too. ben
Hi Roel, thanks for taking on ESS! (I was surprised to see that ESS is not actually part of Emacs; I always assumed it was.) >>From 0beacae7c386ea032cfac4511f4a9bc313fb1fb9 Mon Sep 17 00:00:00 2001 > From: Roel Janssen <roel@gnu.org> > Date: Tue, 5 Jul 2016 14:53:03 +0200 > Subject: [PATCH] gnu: Add emacs-ess. > > * gnu/packages/emacs.scm (emacs-ess): New variable. > --- > gnu/packages/emacs.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 45 insertions(+) > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > index db88df1..3cc5875 100644 > --- a/gnu/packages/emacs.scm > +++ b/gnu/packages/emacs.scm > @@ -42,11 +42,13 @@ > #:use-module (guix build-system glib-or-gtk) > #:use-module (guix build-system trivial) > #:use-module (gnu packages) > + #:use-module (gnu packages bash) > #:use-module (gnu packages guile) > #:use-module (gnu packages gtk) > #:use-module (gnu packages gnome) > #:use-module (gnu packages ncurses) > #:use-module (gnu packages texinfo) > + #:use-module (gnu packages tex) > #:use-module (gnu packages tls) > #:use-module (gnu packages pkg-config) > #:use-module (gnu packages xorg) > @@ -67,6 +69,7 @@ > #:use-module (gnu packages perl) > #:use-module (gnu packages pdf) > #:use-module (gnu packages scheme) > + #:use-module (gnu packages statistics) > #:use-module (gnu packages xiph) > #:use-module (gnu packages mp3) > #:use-module (guix utils) > @@ -2475,3 +2478,45 @@ news items, openrc and runscripts.") > in English as you type. It primarily detects \"weasel words\" and abuse of > passive voice.") > (license license:gpl3+))) > + > +(define-public emacs-ess > + (package > + (name "emacs-ess") > + (version "16.04") > + (source (origin > + (method url-fetch) > + (uri (string-append "http://ess.r-project.org/downloads/ess/ess-" > + version ".tgz")) > + (file-name (string-append name "-" version ".tar.gz")) Here again I wonder if that’s really needed. > + (sha256 > + (base32 > + "0w7mbbajn377gdmvnd21mpyr368b2ia46gq6cb99y4y5rspf9pcg")))) > + (build-system gnu-build-system) I wonder: how much of ESS is written in elisp? Does it make sense to add some of the phases provided by the “emacs-build-system”? > + (arguments > + `(#:tests? #f ; There is no test suite. > + #: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 = " (assoc-ref inputs "bash") > + "/bin/sh"))))) Guix has “/bin/sh”. Do we really need to substitute it for bash? If this is necessary, you could also use “(which "bash")” instead. > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (system* "make" "install" > + (string-append "PREFIX=" (assoc-ref outputs > "out")))))))) How about moving this to “#:make-flags”? > + (inputs > + `(("emacs" ,emacs) Have you tried building with “emacs-minimal”? > + ("r" ,r) > + ("bash" ,bash) I’m not sure but I think “bash” is an implicit input. > + ("texinfo" ,texinfo) > + ("texlive" ,texlive))) As Ben wrote “texlive-minimal” might be sufficient. Please also move these two to “native-inputs” if that’s possible. > + (home-page "http://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, S-Plus, SAS, Stata and > +OpenBUGS/JAGS.") I would write “such as R or OpenBUGS.” The other options are proprietary software, so I don’t think we should mention them. > + (license license:gpl2+))) ~~ Ricardo
Ben Woodcroft writes: > Hi. > > On 05/07/16 20:56, Roel Janssen wrote: >> Dear Guix, >> >> I have a question about the following patch to add emacs-ess. > > Thanks, I was also making a half-hearted attempt at this. Sorry for the duplicated effort. I am happy to merge the two if you're doing something more intelligent in your patch :). >> By default, the build files rely upon a LaTeX distribution to be >> installed to generate a PDF from its Texinfo documentation. >> >> I know that texlive is quite a heavy package, so should I separate the >> output of this package in "out" and "doc", and substitute/patch the >> involved Makefiles? > > Have you tried texlive-minimal ? I hadn't thought of that. Good idea. Would it be acceptable to use texlive-minimal instead, without splitting it in two outputs? >> You can find the patch below. > > I didn't find the time to test the patch, but looks fine to me on the > face of it. I had it in statistics.scm but I think emacs.scm is fine too. I think it is more Emacs-specific than statistics-specific. But either option is fine with me. Thanks! Kind regards, Roel Janssen
On 05/07/16 21:44, Roel Janssen wrote: > Ben Woodcroft writes: > >> Hi. >> >> On 05/07/16 20:56, Roel Janssen wrote: >>> Dear Guix, >>> >>> I have a question about the following patch to add emacs-ess. >> Thanks, I was also making a half-hearted attempt at this. > Sorry for the duplicated effort. I am happy to merge the two if you're > doing something more intelligent in your patch :). Oh not at all, the half in 'half-heartedly' was very generous. > >>> By default, the build files rely upon a LaTeX distribution to be >>> installed to generate a PDF from its Texinfo documentation. >>> >>> I know that texlive is quite a heavy package, so should I separate the >>> output of this package in "out" and "doc", and substitute/patch the >>> involved Makefiles? >> Have you tried texlive-minimal ? > I hadn't thought of that. Good idea. Would it be acceptable to use > texlive-minimal instead, without splitting it in two outputs? As Ricardo suggests perhaps they should be native-inputs instead, in which case splitting the outputs doesn't help since we do not have output-specific inputs. ben
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index db88df1..3cc5875 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -42,11 +42,13 @@ #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages guile) #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) #:use-module (gnu packages ncurses) #:use-module (gnu packages texinfo) + #:use-module (gnu packages tex) #:use-module (gnu packages tls) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xorg) @@ -67,6 +69,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pdf) #:use-module (gnu packages scheme) + #:use-module (gnu packages statistics) #:use-module (gnu packages xiph) #:use-module (gnu packages mp3) #:use-module (guix utils) @@ -2475,3 +2478,45 @@ news items, openrc and runscripts.") in English as you type. It primarily detects \"weasel words\" and abuse of passive voice.") (license license:gpl3+))) + +(define-public emacs-ess + (package + (name "emacs-ess") + (version "16.04") + (source (origin + (method url-fetch) + (uri (string-append "http://ess.r-project.org/downloads/ess/ess-" + version ".tgz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0w7mbbajn377gdmvnd21mpyr368b2ia46gq6cb99y4y5rspf9pcg")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There is no test suite. + #: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 = " (assoc-ref inputs "bash") + "/bin/sh"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (system* "make" "install" + (string-append "PREFIX=" (assoc-ref outputs "out")))))))) + (inputs + `(("emacs" ,emacs) + ("r" ,r) + ("bash" ,bash) + ("texinfo" ,texinfo) + ("texlive" ,texlive))) + (home-page "http://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, S-Plus, SAS, Stata and +OpenBUGS/JAGS.") + (license license:gpl2+)))