Noé Lopez wrote 2 weeks ago
(address . guix-patches@gnu.org)(name . Noé Lopez)(address . noelopez@free.fr)
From: Noé Lopez <noelopez@free.fr>
Hi,
This patch adds a new “guix appstream” command that generates an AppStream
catalog out of all packages contained in the current guix (channels included).
This patch is part of my work on PackageKit integration and is needed for
Gnome Software and Discover to recognise packages. The installation of the
xml file is intentionaly left out for now, but I imagine it could be done
using a (home) service. Similarly, the xml file presents some shortcomings:
– It contains too many packages, and does not take into account the different
package outputs.
– It does not respect packages’ metainfo files or desktop entries, as you need
a built package for that. This means no icons, wrong rDNS ids, and only the
metainfo guix knows.
It doesn’t need to be merged in this version but I am posting to get some
reviews on what I currently have :)
If you want to try out the command, the resulting xml file should be placed in
/var/lib/swcatalog/xml/ and can be tested using appstreamcli:
noe@lignux ~/src/guix-appstream [env]$ ./pre-inst-env guix appstream
[…]
Created guix-1.4.0-31.121e96d.xml with 33125 packages
noe@lignux ~/src/guix-appstream [env]$ sudo cp guix-1.4.0-31.121e96d.xml /var/lib/swcatalog/xml/
noe@lignux ~/src/guix-appstream [env]$ guix shell appstream -- appstreamcli search openttd
Identifier: openttd [desktop-application]
Name: openttd
Summary: Transportation economics simulator game
Package: openttd
Homepage: https://www.openttd.org/
\---
Identifier: catcodec [desktop-application]
Name: catcodec
Summary: Encode/decode OpenTTD sounds
Package: catcodec
Noé Lopez (1):
guix appstream: New script.
Makefile.am | 1 +
guix/import/utils.scm | 14 +++++
guix/scripts/appstream.scm | 125 +++++++++++++++++++++++++++++++++++++
3 files changed, 140 insertions(+)
create mode 100644 guix/scripts/appstream.scm
base-commit: d1e3c41abdda9f8e9f1283376feb853670393793
--
2.48.1