guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guix Website] A Search Page for Packages


From: Christopher Baines
Subject: Re: [Guix Website] A Search Page for Packages
Date: Sun, 13 Nov 2022 08:46:42 +0000
User-agent: mu4e 1.8.9; emacs 28.1

Luis Felipe <luis.felipe.la@protonmail.com> writes:

>> > What Danjela produced in terms of the search is probably fine as
>> > something to go with, maybe the additional thing that needs writing is
>> > pages for the individual packages that the search can link to (they can
>> > just be very simple initially).
>>
>> > But yeah, are you (or anyone else who's reading) up for hacking on this?
>>
>> Yeah, I'm willing to work on that. I'll start by adding support for handling 
>> requests for package detail pages.
>
> I have a working package browser now and will be styling it next. I'll link 
> to a public repository later.
>
> However, I have some questions about the Data Service:

Hey! Sorry for the slow reply.

> 1. Is there any way to page through the data
> (e.g. https://dev.socrata.com/docs/paging.html#2.1)?

For most bits of data, yes. Although I haven't used limit/offset style
pagination as that doesn't perform particularly well.

The Guix Data Service web pages should help with how to use the API, so
you can look at how the packages page handles pagination for example:

  
https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/packages

> 2. What would be an efficient way to get the total count of packages?
> (to be used as in https://guix.gnu.org/en/packages/)

You can get a count here for example [1], that also works with the
latest-processed-revision URL [2]. I think the counting methadolody is a
bit different to what's currently used though.

1: 
https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80.json
2: 
https://data.guix.gnu.org/repository/1/branch/master/latest-processed-revision.json

> 3. Is there any way to get the "supported-systems" info of a package?

The value of that specific field isn't recorded, but you could look at
the derivations of the package, then just find the systems, that should
be pretty close:

  
https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/package/0ad/0.0.26-alpha.json

Thanks,

Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]