* [PATCH 2/2] Add jq @ 2016-03-26 17:41 Jelle Licht 2016-03-26 19:13 ` Alex Griffin 0 siblings, 1 reply; 9+ messages in thread From: Jelle Licht @ 2016-03-26 17:41 UTC (permalink / raw) To: guix-devel [-- Attachment #1.1: Type: text/plain, Size: 52 bytes --] ... and the actual package I wanted to use on guix! [-- Attachment #1.2: Type: text/html, Size: 77 bytes --] [-- Attachment #2: 0002-gnu-Add-jq.patch --] [-- Type: text/x-patch, Size: 1898 bytes --] From 83cfc9414fca3ab57c949e18c1ceb375a179b59c Mon Sep 17 00:00:00 2001 From: Jelle Licht <jlicht@fsfe.org> Date: Sat, 26 Mar 2016 18:31:23 +0100 Subject: [PATCH 2/2] gnu: Add jq * gnu/packages/web.scm (jq): New variable --- gnu/packages/web.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 516e623..e735410 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> +;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,6 +57,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages statistics)) @@ -3109,3 +3111,22 @@ callback or connection interfaces.") "Gumbo is an implementation of the HTML5 parsing algorithm implemented as a pure C99 library.") (license l:asl2.0))) + +(define-public jq + (package + (name "jq") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/stedolan/" + "jq/archive/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0r9wac540z8p663xd8gnzgbzxcnqkdzkxs0dwz0x09wcs90pcrnm")))) + (inputs + `(("oniguruma" ,oniguruma))) + (build-system gnu-build-system) + (home-page "http://stedolan.github.io/jq/") + (synopsis "Command-line JSON processor") + (description "jq is a lightweight and flexible command-line JSON processor.") + (license l:cc-by3.0))) -- 2.7.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 17:41 [PATCH 2/2] Add jq Jelle Licht @ 2016-03-26 19:13 ` Alex Griffin 2016-03-26 22:06 ` Jelle Licht 0 siblings, 1 reply; 9+ messages in thread From: Alex Griffin @ 2016-03-26 19:13 UTC (permalink / raw) To: guix-devel Heh, I've had this packaged for ages (along with some others) and I've put off submitting because I don't have a good workflow yet for git+email. I should probably do something about that. Anyway, your oniguruma package looks good to me. Here's a few notes about jq: You listed jq's license at cc-by3.0, but that's only for the docs. Most of the jq code is under the x11 license, except a few files which were taken from other projects. I don't know how to specify multiple licenses - maybe someone more experienced with Guix can chime in? Your source URL is not stable (the hash will change at any time because it's autogenerated by Github and not guaranteed to be identical). I would use https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz instead. You should add valgrind as a dependency so that the test suite can run. Finally, your description is a bit sparse. Here's what I wrote: jq is like sed for JSON data – you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. It is written in portable C, and it has zero runtime dependencies. jq can mangle the data format that you have into the one that you want with very little effort, and the program to do so is often shorter and simpler than you’d expect. Hope that helps! -- Alex Griffin On Sat, Mar 26, 2016, at 12:41 PM, Jelle Licht wrote: > ... and the actual package I wanted to use on guix! > Email had 1 attachment: > * 0002-gnu-Add-jq.patch > 3k (text/x-patch) ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 19:13 ` Alex Griffin @ 2016-03-26 22:06 ` Jelle Licht 2016-03-26 22:45 ` Leo Famulari 0 siblings, 1 reply; 9+ messages in thread From: Jelle Licht @ 2016-03-26 22:06 UTC (permalink / raw) To: Alex Griffin; +Cc: guix-devel [-- Attachment #1.1: Type: text/plain, Size: 2337 bytes --] Thanks for your feedback Alex. I have seen some other packages including multiple licenses in the list of licenses, so I took that approach. I also took the liberty of taking your description, which seems to also be coming directly from the jq website. While digging into the valgrind issue, I found out that documentation is currently not being generated; after looking at what was required for this to work, I worked things out up to the ruby-sass gem; I might finish it if I have more time in the near future, but for now; ... jq, attempt two. ~Jelle 2016-03-26 20:13 GMT+01:00 Alex Griffin <a@ajgrf.com>: > Heh, I've had this packaged for ages (along with some others) and I've > put off submitting because I don't have a good workflow yet for > git+email. I should probably do something about that. Anyway, your > oniguruma package looks good to me. Here's a few notes about jq: > > You listed jq's license at cc-by3.0, but that's only for the docs. Most > of the jq code is under the x11 license, except a few files which were > taken from other projects. I don't know how to specify multiple licenses > - maybe someone more experienced with Guix can chime in? > > Your source URL is not stable (the hash will change at any time because > it's autogenerated by Github and not guaranteed to be identical). I > would use > https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz > instead. > > You should add valgrind as a dependency so that the test suite can run. > > Finally, your description is a bit sparse. Here's what I wrote: > > jq is like sed for JSON data – you can use it to slice and filter > and map and transform structured data with the same ease that sed, > awk, grep and friends let you play with text. > > It is written in portable C, and it has zero runtime dependencies. > > jq can mangle the data format that you have into the one that you > want with very little effort, and the program to do so is often > shorter and simpler than you’d expect. > > Hope that helps! > -- > Alex Griffin > > > On Sat, Mar 26, 2016, at 12:41 PM, Jelle Licht wrote: > > ... and the actual package I wanted to use on guix! > > Email had 1 attachment: > > > > * 0002-gnu-Add-jq.patch > > 3k (text/x-patch) > > [-- Attachment #1.2: Type: text/html, Size: 3079 bytes --] [-- Attachment #2: 0002-gnu-Add-jq.patch --] [-- Type: text/x-patch, Size: 2712 bytes --] From 991ccfdb49c9f18e35e6b99af9052f64a6464b09 Mon Sep 17 00:00:00 2001 From: Jelle Licht <jlicht@fsfe.org> Date: Sat, 26 Mar 2016 22:49:42 +0100 Subject: [PATCH 2/2] gnu: Add jq * gnu/packages/web.scm: (jq): New variable --- gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 516e623..c7392c6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> +;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,10 +53,12 @@ #:use-module (gnu packages python) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages valgrind) #:use-module (gnu packages xml) #:use-module (gnu packages curl) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages statistics)) @@ -3109,3 +3112,33 @@ callback or connection interfaces.") "Gumbo is an implementation of the HTML5 parsing algorithm implemented as a pure C99 library.") (license l:asl2.0))) + +(define-public jq + (package + (name "jq") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/stedolan/" name + "/releases/download/" name "-" version + "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4")))) + (inputs + `(("oniguruma" ,oniguruma))) + (native-inputs + `(;; TODO fix gems to generate documentation + ;;("ruby" ,ruby) + ;;("bundler" ,bundler) + ("valgrind" ,valgrind))) + (build-system gnu-build-system) + (home-page "http://stedolan.github.io/jq/") + (synopsis "Command-line JSON processor") + (description "jq is like sed for JSON data – you can use it to slice and +filter and map and transform structured data with the same ease that sed, awk, +grep and friends let you play with text. It is written in portable C, and it +has zero runtime dependencies. jq can mangle the data format that you have +into the one that you want with very little effort, and the program to do so +is often shorter and simpler than you’d expect.") + (license (list l:expat l:cc-by3.0)))) -- 2.7.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 22:06 ` Jelle Licht @ 2016-03-26 22:45 ` Leo Famulari 2016-03-26 22:53 ` Jelle Licht 0 siblings, 1 reply; 9+ messages in thread From: Leo Famulari @ 2016-03-26 22:45 UTC (permalink / raw) To: Jelle Licht; +Cc: guix-devel On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote: > + (inputs > + `(("oniguruma" ,oniguruma))) [...] > + (description "jq is like sed for JSON data – you can use it to slice and > +filter and map and transform structured data with the same ease that sed, awk, > +grep and friends let you play with text. It is written in portable C, and it > +has zero runtime dependencies. jq can mangle the data format that you have ^-----------------------^ Since oniguruma is listed as a run-time dependency, does this mean the description is wrong? Or is oniguruma only needed to build? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 22:45 ` Leo Famulari @ 2016-03-26 22:53 ` Jelle Licht 2016-03-26 23:15 ` Alex Griffin 2016-03-26 23:26 ` Leo Famulari 0 siblings, 2 replies; 9+ messages in thread From: Jelle Licht @ 2016-03-26 22:53 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 1083 bytes --] From jq's README: To get regexp support you'll also need to install Oniguruma (note that jq's > tests require regexp support to pass). So it seems to be an optional dependency (which allows tests to pass and adds functionality). I could make it a build-time dependency, or not. What is the 'guix' way of handling these cases? -- Jelle 2016-03-26 23:45 GMT+01:00 Leo Famulari <leo@famulari.name>: > On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote: > > + (inputs > > + `(("oniguruma" ,oniguruma))) > > [...] > > > + (description "jq is like sed for JSON data – you can use it to > slice and > > +filter and map and transform structured data with the same ease that > sed, awk, > > +grep and friends let you play with text. It is written in portable C, > and it > > +has zero runtime dependencies. jq can mangle the data format that you > have > ^-----------------------^ > > Since oniguruma is listed as a run-time dependency, does this mean the > description is wrong? Or is oniguruma only needed to build? > [-- Attachment #2: Type: text/html, Size: 1658 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 22:53 ` Jelle Licht @ 2016-03-26 23:15 ` Alex Griffin 2016-03-26 23:26 ` Leo Famulari 1 sibling, 0 replies; 9+ messages in thread From: Alex Griffin @ 2016-03-26 23:15 UTC (permalink / raw) To: Jelle Licht, Leo Famulari; +Cc: guix-devel Usually a second package is added which is just a variant on the first. Something like this: (define-public jq-no-oniq (package (inherit jq) (name "jq-no-onig") (inputs '()))) But in this case I'm not sure it's worth it. Maybe just remove the part about zero dependencies from the description instead. -- Alex Griffin On Sat, Mar 26, 2016, at 05:53 PM, Jelle Licht wrote: > From jq's README: > >> To get regexp support you'll also need to install Oniguruma (note that jq's tests require regexp support to pass). > > So it seems to be an optional dependency (which allows tests to pass and adds functionality). I could make it a build-time dependency, or not. > What is the 'guix' way of handling these cases? > > -- > Jelle > > > 2016-03-26 23:45 GMT+01:00 Leo Famulari <leo@famulari.name>: >> On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote: >> > + (inputs >> > + `(("oniguruma" ,oniguruma))) >> >> >> [...] >> >> >> > + (description "jq is like sed for JSON data – you can use it to slice and >> > +filter and map and transform structured data with the same ease that sed, awk, >> > +grep and friends let you play with text. It is written in portable C, and it >> > +has zero runtime dependencies. jq can mangle the data format that you have >> ^-----------------------^ >> >> >> Since oniguruma is listed as a run-time dependency, does this mean the >> description is wrong? Or is oniguruma only needed to build? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 22:53 ` Jelle Licht 2016-03-26 23:15 ` Alex Griffin @ 2016-03-26 23:26 ` Leo Famulari 2016-03-26 23:34 ` Jelle Licht 1 sibling, 1 reply; 9+ messages in thread From: Leo Famulari @ 2016-03-26 23:26 UTC (permalink / raw) To: Jelle Licht; +Cc: guix-devel On Sat, Mar 26, 2016 at 11:53:24PM +0100, Jelle Licht wrote: > From jq's README: > > To get regexp support you'll also need to install Oniguruma (note that jq's > > tests require regexp support to pass). > > > So it seems to be an optional dependency (which allows tests to pass and > adds functionality). I could make it a build-time dependency, or not. > What is the 'guix' way of handling these cases? In this case I think the description should be changed. > > -- > Jelle > > > 2016-03-26 23:45 GMT+01:00 Leo Famulari <leo@famulari.name>: > > > On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote: > > > + (inputs > > > + `(("oniguruma" ,oniguruma))) > > > > [...] > > > > > + (description "jq is like sed for JSON data – you can use it to > > slice and > > > +filter and map and transform structured data with the same ease that > > sed, awk, > > > +grep and friends let you play with text. It is written in portable C, > > and it > > > +has zero runtime dependencies. jq can mangle the data format that you > > have > > ^-----------------------^ > > > > Since oniguruma is listed as a run-time dependency, does this mean the > > description is wrong? Or is oniguruma only needed to build? > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 23:26 ` Leo Famulari @ 2016-03-26 23:34 ` Jelle Licht 2016-04-01 8:59 ` Alex Kost 0 siblings, 1 reply; 9+ messages in thread From: Jelle Licht @ 2016-03-26 23:34 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel [-- Attachment #1.1: Type: text/plain, Size: 1433 bytes --] 2016-03-27 0:26 GMT+01:00 Leo Famulari <leo@famulari.name>: > On Sat, Mar 26, 2016 at 11:53:24PM +0100, Jelle Licht wrote: > > From jq's README: > > > > To get regexp support you'll also need to install Oniguruma (note that > jq's > > > tests require regexp support to pass). > > > > > > So it seems to be an optional dependency (which allows tests to pass and > > adds functionality). I could make it a build-time dependency, or not. > > What is the 'guix' way of handling these cases? > > In this case I think the description should be changed. > > > > > -- > > Jelle > > > > > > 2016-03-26 23:45 GMT+01:00 Leo Famulari <leo@famulari.name>: > > > > > On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote: > > > > + (inputs > > > > + `(("oniguruma" ,oniguruma))) > > > > > > [...] > > > > > > > + (description "jq is like sed for JSON data – you can use it to > > > slice and > > > > +filter and map and transform structured data with the same ease that > > > sed, awk, > > > > +grep and friends let you play with text. It is written in portable > C, > > > and it > > > > +has zero runtime dependencies. jq can mangle the data format that > you > > > have > > > ^-----------------------^ > > > > > > Since oniguruma is listed as a run-time dependency, does this mean the > > > description is wrong? Or is oniguruma only needed to build? > > > > ^ changed [-- Attachment #1.2: Type: text/html, Size: 2174 bytes --] [-- Attachment #2: 0002-gnu-Add-jq.patch --] [-- Type: text/x-patch, Size: 2678 bytes --] From 9bc43e4ee37a35ba8e724eac103c39c72d870f75 Mon Sep 17 00:00:00 2001 From: Jelle Licht <jlicht@fsfe.org> Date: Sat, 26 Mar 2016 22:49:42 +0100 Subject: [PATCH 2/2] gnu: Add jq * gnu/packages/web.scm: (jq): New variable --- gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 516e623..49fe19e 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> +;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,10 +53,12 @@ #:use-module (gnu packages python) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages valgrind) #:use-module (gnu packages xml) #:use-module (gnu packages curl) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages statistics)) @@ -3109,3 +3112,33 @@ callback or connection interfaces.") "Gumbo is an implementation of the HTML5 parsing algorithm implemented as a pure C99 library.") (license l:asl2.0))) + +(define-public jq + (package + (name "jq") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/stedolan/" name + "/releases/download/" name "-" version + "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4")))) + (inputs + `(("oniguruma" ,oniguruma))) + (native-inputs + `(;; TODO fix gems to generate documentation + ;;("ruby" ,ruby) + ;;("bundler" ,bundler) + ("valgrind" ,valgrind))) + (build-system gnu-build-system) + (home-page "http://stedolan.github.io/jq/") + (synopsis "Command-line JSON processor") + (description "jq is like sed for JSON data – you can use it to slice and +filter and map and transform structured data with the same ease that sed, awk, +grep and friends let you play with text. It is written in portable C. jq and +can mangle the data format that you have into the one that you want with very +little effort, and the program to do so is often shorter and simpler than +you’d expect.") + (license (list l:expat l:cc-by3.0)))) -- 2.7.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Add jq 2016-03-26 23:34 ` Jelle Licht @ 2016-04-01 8:59 ` Alex Kost 0 siblings, 0 replies; 9+ messages in thread From: Alex Kost @ 2016-04-01 8:59 UTC (permalink / raw) To: Jelle Licht; +Cc: guix-devel Jelle Licht (2016-03-27 01:06 +0300) wrote: > I have seen some other packages including multiple licenses in the > list of licenses, > so I took that approach. That's right. > While digging into the valgrind issue, I found out that documentation > is currently not being generated; > after looking at what was required for this to work, I worked things > out up to the ruby-sass gem; I might finish > it if I have more time in the near future OK, since this documentation issue is not very important, I committed your patch. Thank you for contributing, and thanks to Alex Griffin for helping! > From 9bc43e4ee37a35ba8e724eac103c39c72d870f75 Mon Sep 17 00:00:00 2001 > From: Jelle Licht <jlicht@fsfe.org> > Date: Sat, 26 Mar 2016 22:49:42 +0100 > Subject: [PATCH 2/2] gnu: Add jq > > * gnu/packages/web.scm: (jq): New variable > --- > gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) [...] > + (native-inputs > + `(;; TODO fix gems to generate documentation > + ;;("ruby" ,ruby) > + ;;("bundler" ,bundler) I left this TODO, so you are welcome to continue the work :-) -- Alex ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-04-01 8:59 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-26 17:41 [PATCH 2/2] Add jq Jelle Licht 2016-03-26 19:13 ` Alex Griffin 2016-03-26 22:06 ` Jelle Licht 2016-03-26 22:45 ` Leo Famulari 2016-03-26 22:53 ` Jelle Licht 2016-03-26 23:15 ` Alex Griffin 2016-03-26 23:26 ` Leo Famulari 2016-03-26 23:34 ` Jelle Licht 2016-04-01 8:59 ` Alex Kost
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.