From patchwork Wed Jul 6 08:28:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roel Janssen X-Patchwork-Id: 13667 Received: (qmail 86459 invoked by uid 89); 6 Jul 2016 08:30:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 Jul 2016 08:30:37 +0000 Received: from localhost ([::1]:60036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKiE5-0003Uc-Tc for patchwork@sourceware.org; Wed, 06 Jul 2016 04:30:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKiCE-0001k2-Rt for guix-devel@gnu.org; Wed, 06 Jul 2016 04:28:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKiC9-0006Ww-Ov for guix-devel@gnu.org; Wed, 06 Jul 2016 04:28:37 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKiC9-0006Ws-L4; Wed, 06 Jul 2016 04:28:33 -0400 Received: from [143.121.198.69] (port=38752 helo=roel-tp) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bKiC9-0005F2-15; Wed, 06 Jul 2016 04:28:33 -0400 References: <87h9c45jlq.fsf@gnu.org> <87wpl0kxvc.fsf@elephly.net> User-agent: mu4e 0.9.17; emacs 24.5.1 From: Roel Janssen To: Ricardo Wurmus Subject: Re: [PATCH] gnu: Add emacs-ess. In-reply-to: <87wpl0kxvc.fsf@elephly.net> Date: Wed, 06 Jul 2016 10:28:46 +0200 Message-ID: <87d1mrkw5d.fsf@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" Hello Ricardo, Thanks for your quick and elaborate reply. Ricardo Wurmus writes: > 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 >> 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. You're right, again. So I removed it. >> + (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”? I tried building it with the emacs-build-system instead, but that fails on not finding "/bin/sh". Did it not patch that out? Maybe I am missing the point, but it seems that the build system behaves just fine with 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"))))) > > Guix has “/bin/sh”. Do we really need to substitute it for bash? If > this is necessary, you could also use “(which "bash")” instead. That's odd. I was under the impression that "/bin/sh" is not available during the build, because that's where the emacs-build-system fails at. We don't need bash indeed, so I used '(which "sh")' instead. This is pretty cool! >> + (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”? Indeed. Moved it to #:make-flags. >> + (inputs >> + `(("emacs" ,emacs) > > Have you tried building with “emacs-minimal”? Now I have, and that seems to work too. I updated the patch accordingly. >> + ("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. Unfortunately, when building with texlive-minimal, we are missing a font: !pdfTeX error: /gnu/store/gnh4kn47mn3m2rlgm9i9xl3wmq2kahia-texlive-minimal-2016 /bin/pdftex (file cmr9): Font cmr9 at 600 not found ==> Fatal error occurred, no output PDF file produced! Which makes the build fail. So I think we need 'texlive' instead. >> + (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. Oh right. Sorry I didn't actually check out those projects, and I didn't know they were proprietary.. I updated the patch. >> + (license license:gpl2+))) > > ~~ Ricardo Other than these changes, I found out that the build process expects perl to be available when building the documentation. Therefore, I included perl in the native-inputs. So this brings us to the following patch: >From d54a474938fc9653fe1fb5c5c953f9dc9566a7d9 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 6 Jul 2016 10:26:01 +0200 Subject: [PATCH] gnu: Add emacs-ess. * gnu/packages/emacs.scm (emacs-ess): New variable. --- gnu/packages/emacs.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index db88df1..78557e4 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -46,6 +46,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) #:use-module (gnu packages ncurses) + #:use-module (gnu packages tex) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages pkg-config) @@ -67,6 +68,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) @@ -2098,6 +2100,43 @@ that highlights non-conforming text. The subset of the English language called E-Prime forbids the use of the \"to be\" form to strengthen your writing.") (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")) + (sha256 + (base32 + "0w7mbbajn377gdmvnd21mpyr368b2ia46gq6cb99y4y5rspf9pcg")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There is no test suite. + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #: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"))))))))) + (inputs + `(("emacs" ,emacs-minimal) + ("r" ,r))) + (native-inputs + `(("perl" ,perl) + ("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 and OpenBUGS.") + (license license:gpl2+))) + (define-public emacs-smex (package (name "emacs-smex")