From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raimon Grau Subject: Re: New package: xmlstarlet Date: Mon, 28 Dec 2015 21:09:42 +0000 Message-ID: References: <87si2m7piw.fsf@gmail.com> <87lh8e4ayw.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113fb9f07822d00527fbba65 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDf3N-0000cc-3W for guix-devel@gnu.org; Mon, 28 Dec 2015 16:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDf3L-0003Jt-E1 for guix-devel@gnu.org; Mon, 28 Dec 2015 16:10:05 -0500 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:36071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDf3L-0003JD-1w for guix-devel@gnu.org; Mon, 28 Dec 2015 16:10:03 -0500 Received: by mail-lf0-x22a.google.com with SMTP id z124so198911294lfa.3 for ; Mon, 28 Dec 2015 13:10:02 -0800 (PST) In-Reply-To: <87lh8e4ayw.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: "guix-devel@gnu.org" , Raimon Grau --001a113fb9f07822d00527fbba65 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > Hi Raimon, > > thanks for your patch! Did you use =E2=80=9Cguix lint xmlstarlet=E2=80= =9D? > Yes I did use it. I had some issues running it in a guix checkout, but eventually got to run it: http://puntoblogspot.blogspot.com.es/2015/12/linting-guix-packages.html >> From 592e889da41a92f029526283c7c837cd426f21cb Mon Sep 17 00:00:00 2001 >> From: Raimon Grau >> Date: Mon, 28 Dec 2015 11:51:59 +0000 >> Subject: [PATCH] gnu: Add xmlstarlet. > >> * gnu/packages/xml.scm (xmlstarlet): New variable. >> --- >> gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) > >> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm >> index 8288869..5309aea 100644 >> --- a/gnu/packages/xml.scm >> +++ b/gnu/packages/xml.scm >> @@ -6,6 +6,7 @@ >> ;;; Copyright =C2=A9 2015 Ricardo Wurmus >> ;;; Copyright =C2=A9 2015 Mark H Weaver >> ;;; Copyright =C2=A9 2015 Efraim Flashner >> +;;; Copyright =C2=A9 2015 Raimon Grau >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -707,3 +708,32 @@ Cflags: -I${includedir} >> C++ programming langauge.") >> (home-page "http://www.grinninglizard.com/tinyxml/index.html") >> (license license:zlib))) >> + >> +(define-public xmlstarlet >> + (package >> + (name "xmlstarlet") >> + (version "1.6.1") >> + (source >> + (origin >> + (method url-fetch) >> + (uri (string-append >> + "http://downloads.sourceforge.net/project/xmlstar/xmlstarle= t/" >> + version >> + "/xmlstarlet-" >> + version >> + ".tar.gz")) > > You might be able to use =E2=80=9Cmirror://sourceforge/=E2=80=9D instead.= I also think > it looks nicer to have fewer lines here, e.g.: > > (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/" > version "/xmlstarlet-" version ".tar.gz")) > Thanks, fixed. >> + (sha256 >> + (base32 >> + "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m")))) >> + (build-system gnu-build-system) >> + (inputs >> + `(("libxslt" ,libxslt) >> + ("libxml2" ,libxml2))) >> + (home-page "http://xmlstar.sourceforge.net/") >> + (synopsis "Command line XML Toolkit") > > =E2=80=9Ctoolkit=E2=80=9D rather than =E2=80=9CToolkit=E2=80=9D. But may= be there=E2=80=99s a better synopsis > that tells us a little more about the tools? (I cannot suggest anything > better.) > >> + (description "XMLStarlet is a set of command line utilities (tools) >> +which can be used to transform, query, validate, and edit XML >> +documents and files using simple set of shell commands in similar way >> +it is done for plain text files using UNIX grep, sed, awk, diff, >> +patch, join, etc commands.") > > This is a little hard to read and the comparison with coreutils isn=E2=80= =99t > very helpful (what does this really mean?). I=E2=80=99d write the first > sentence like this: > > "XMLStarlet is a set of command line utilities which can be used to > transform, query, validate, and edit XML documents." > > And then add another sentence about the commands. Note that there > should be two spaces between sentences. I agree the comparison with coreutils is not very easy to understand, but it's how the package is defined in its home page (http://xmlstar.sourceforge.net/overview.php). As a '2nd sentence' the home page says: "This set of command line utilities can be used by those who deal with many= XML documents on UNIX shell command prompt as well as for automated XML proces= sing with shell scripts." Which is not very clear either. I'm attaching the modified version with all but the description change, in case anyone knows how to reword it and integrate it already. If not, any suggestions? Cheers, Rai --001a113fb9f07822d00527fbba65 Content-Type: text/x-diff; charset=UTF-8; name="0001-gnu-Add-xmlstarlet.patch" Content-Disposition: attachment; filename="0001-gnu-Add-xmlstarlet.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iiqgkbu70 RnJvbSAyY2UxZDcxOTk1YTE1YTg2NzJkNzk1NmUxNTU0MGY2Y2E2Mjk0ODdhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSYWltb24gR3JhdSA8cmFpbW9uQDNzY2FsZS5uZXQ+CkRhdGU6 IE1vbiwgMjggRGVjIDIwMTUgMTE6NTE6NTkgKzAwMDAKU3ViamVjdDogW1BBVENIXSBnbnU6IEFk ZCB4bWxzdGFybGV0LgoKKiBnbnUvcGFja2FnZXMveG1sLnNjbSAoeG1sc3RhcmxldCk6IE5ldyB2 YXJpYWJsZS4KLS0tCiBnbnUvcGFja2FnZXMveG1sLnNjbSB8IDI2ICsrKysrKysrKysrKysrKysr KysrKysrKysrCiAxIGZpbGUgY2hhbmdlZCwgMjYgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBh L2dudS9wYWNrY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