[Nix-dev] Nix GUI

Anders F Björklund afb at algonet.se
Mon Apr 12 18:45:22 CEST 2010


Tony White wrote:

> Yeah the gnome ui is written in gtk and the kde ui is written in qt4,
> I don't quite see how that makes them exactly desktop specific other
> than using a few bindings from either desktop, which could be stripped
> out and replaced if need be. Both are open source projects and are
> easily installed whatever the desktop.

Well gnome-packagekit has GNOME dependencies and KPackageKit has
KDE4 dependencies, beyond just GTK+ and Qt4. This is by design...
Some of the UI components are reusable outside those applications.
PackageKit itself uses GObject (and DBUS), plus PolicyKit/DeviceKit.

> packagekit is mostly for users that don't want to go anywhere near the
> command line. [...]

But PackageKit itself is usable for those users, for instance some
applications use it to install font support or drivers and so on.
You are probably right about the audience, some typical use cases
and users are listed on http://www.packagekit.org/pk-profiles.html

> One thing I'm a little unsure of is that I think that some hooks would
> maybe need to be needed somewhere (Maybe to nix itself) To tell
> packagekit something has happened, started, finished, etc?

Not really, PackageKit will spawn a new backend when it needs some
information and then shut down after an idle timeout (= 5 seconds!)
This *could* mean that Nix would need an interim cache database,
for caching Nixpkgs information between those PackageKit calls...

> I agree that C++ is a good idea but just a proof of concept using perl
> or something might be a good starting point.

Main reason for Perl would be that Nix is (partly) written in it,
otherwise PackageKit has better support for making Python backends.
Here's one example of such a backend written in Perl (for URPMI):
http://cgit.freedesktop.org/packagekit/tree/backends/urpmi/helpers/ 
urpmi-dispatched-backend.pl

--anders




More information about the nix-dev mailing list