Re: How to get the package metadata as structured data?

2016-08-10 Thread Catonano
2016-08-10 14:52 GMT+02:00 Ricardo Wurmus : > > Catonano writes: > > > 2016-08-10 13:46 GMT+02:00 Ricardo Wurmus : > > > >> > >> Philippe Ombredanne writes: > >> > >> > David Craven wrote: > >> >> I aborted, since I realised that guix package -s doesn't include the > >> >> source url and hash,

Re: How to get the package metadata as structured data?

2016-08-10 Thread Ricardo Wurmus
Catonano writes: > 2016-08-10 13:46 GMT+02:00 Ricardo Wurmus : > >> >> Philippe Ombredanne writes: >> >> > David Craven wrote: >> >> I aborted, since I realised that guix package -s doesn't include the >> >> source url and hash, which would be important for a testsuite... >> > >> > IMHO, if th

Re: How to get the package metadata as structured data?

2016-08-10 Thread Catonano
2016-08-10 13:46 GMT+02:00 Ricardo Wurmus : > > Philippe Ombredanne writes: > > > David Craven wrote: > >> I aborted, since I realised that guix package -s doesn't include the > >> source url and hash, which would be important for a testsuite... > > > > IMHO, if the rec data is the only way to g

Re: How to get the package metadata as structured data?

2016-08-10 Thread Ricardo Wurmus
Philippe Ombredanne writes: > David Craven wrote: >> I aborted, since I realised that guix package -s doesn't include the >> source url and hash, which would be important for a testsuite... > > IMHO, if the rec data is the only way to get to the packages data, the > source url would be rather e

Re: How to get the package metadata as structured data?

2016-08-05 Thread Philippe Ombredanne
David Craven wrote: > I aborted, since I realised that guix package -s doesn't include the > source url and hash, which would be important for a testsuite... IMHO, if the rec data is the only way to get to the packages data, the source url would be rather essential to get in. -- Cordially Phili

Re: How to get the package metadata as structured data?

2016-08-05 Thread Aljosha Papsch
guix package prints its output in rec format. You can use recutils to process the output. Am 5. August 2016 13:04:49 MESZ, schrieb David Craven : >I aborted, since I realised that guix package -s doesn't include the >source url and hash, which would be important for a testsuite... > >Some interes

Re: How to get the package metadata as structured data?

2016-08-05 Thread David Craven
I aborted, since I realised that guix package -s doesn't include the source url and hash, which would be important for a testsuite... Some interesting measurements: guix package --list-available | grep -o --regex "^[a-zA-Z0-9-]*" | wc -l 3797 cat guix-metadata.txt | grep --regex "^name: .*$" | wc

Re: How to get the package metadata as structured data?

2016-08-05 Thread David Craven
This should works, but it's pretty slow... guix package --list-available | grep -o --regex "^[a-zA-Z0-9-]*" | xargs -n1 guix package -s 1> guix-metadata.txt time sh -c "guix package -s guix &> /dev/null" sh -c "guix package -s guix &> /dev/null" 2.42s user 0.07s system 113% cpu 2.203 total

RE: How to get the package metadata as structured data?

2016-08-04 Thread Cook, Malcolm
ounces+mec=stowers@gnu.org] > On Behalf Of Ludovic Courtès > Sent: Thursday, August 04, 2016 4:09 PM > To: Philippe Ombredanne ; David Craven > > Cc: guix-devel > Subject: Re: How to get the package metadata as structured data? > > Hi! > > David C

Re: How to get the package metadata as structured data?

2016-08-04 Thread Ludovic Courtès
Hi! David Craven skribis: > All package metadata can be accessed easily through scheme. There is > no way to export this data currently, although it probably wouldn't be > too hard to implement. One way is: guix package -s . which returns a recutils database¹, which is essentially plain tex

Re: How to get the package metadata as structured data?

2016-08-04 Thread David Craven
Hi Philippe, Thank you for your interest in guix =) All package metadata can be accessed easily through scheme. There is no way to export this data currently, although it probably wouldn't be too hard to implement. The approach I was planning on taking is the following: Take a package, remove al