Closed viric closed 6 years ago
There were certainly some attempts. And there's a branch: https://github.com/NixOS/nixpkgs/tree/gnome-3 (I haven't tried any of these, just remembered there was a branch.)
A few more gnome3 pieces are now in https://github.com/vcunat/nixpkgs/tree/vlada/gtk3 .
Most notably it seems that evince-3.6* works. I'm not yet sure what to do with the work. Maybe it won't break anything and can go to master, but x-updates might be more suitable.
On Tue, Jan 29, 2013 at 08:45:53AM -0800, Vladimír Čunát wrote:
A few more gnome3 pieces are now in https://github.com/vcunat/nixpkgs/tree/vlada/gtk3 .
Most notably it seems that evince-3.6* works. I'm not yet sure what to do with the work. Maybe it won't break anything and can go to master, but x-updates might be more suitable.
I was waiting for someone to bring gnome3 pieces. That could allow building the GUI for gnunet.
I'll take a look at your branch. Thank you!
@viric: I can only see the gtk-3 dependency http://packages.ubuntu.com/quantal/gnunet-gtk
... which was already there, in some older version.
On Mon, Feb 04, 2013 at 04:31:50PM -0800, Vladimír Čunát wrote:
@viric: I can only see the gtk-3 dependency http://packages.ubuntu.com/quantal/gnunet-gtk
... which was already there, in some older version.
I already tried to package it, and got stuck at some gnome 3 requirement (no gtk3, of course). I can't remember now. I'll look at it in a few days.
@bjornfor and me are interested, anyone else?
I have started to package gnome3 3.10 packages, see http://hydra.nixos.org/eval/1052217
There are two issues currently:
@iElectric:
I see that two packages are 3.11: I'll downgrade.
For schemas: we'll need a setup hook to pass that around. It's still pure and less error prone.
@iElectric: you mean auto-wrapping all executables with run-time dependency on all build-time packages providing schemas?
@vcunat for schemas you don't need that. I'd do a setup hook that:
$out/share/glib-2.0/schemas/gschemas.compiled
to $out/share/glib2.0/schemas/${name}/gschemas.compiled
For icons/themes we might need to do run-time dependency on build-time packages that claim to provide icons or themes.
I'm happy to hear a better solution though :)
On Friday, January 10, 2014 06:21:25 AM Domen Kožar wrote:
@vcunat for schemas you don't need that. I'd do a setup hook that:
- adds a fixup phase that copies schema from
$out/share/glib-2.0/schemas/gschemas.compiled
to$out/share/glib2.0/schemas/${name}/gschemas.compiled
and wrapps all executables with the env var to point there.For icons/themes we might need to do run-time dependency on build-time packages that claim to provide icons or themes.
I'm happy to hear a better solution though :)
KDE :P
How about wrapping this in nixos instead of nixpkgs? or patching the lib responsible for schemas to also look into some env var for hints?
There is a var that you can tell it where to look, but you need to move the schemas so they don't conflict in profile environment
Also, useful resource how to configure gtk at run-time: https://developer.gnome.org/gtk3/3.0/gtk-running.html
@vcunat downgraded 3.11 packages to 3.10, thanks for notice.
Well, at least in cinnamon we needed to add schemas also from different packages. I don't know how it's about GNOME3...
@Phreedom: wrapping in nixos isn't enough IMO, as many packages make much sense to run even without the GNOME3 desktop (like eye of gnome, evince).
For the record, jhbuild dependency files are helpful when packaging gnome3 stuff http://ftp.gnome.org/pub/GNOME/teams/releng/3.10.2/gnome-suites-core-3.10.2.modules
I've packaged most of the remaining gnome3 core software, last bit missing is gnome-shell
.
gnome-shell
fails to compile GIR files (gobject introspection). Gnome developers are saying we are linking against different gtk3 version that headers are included from.
Error:
building Shell-0.1.gir
GISCAN Shell-0.1.gir
(lt-gnome-shell:5650): GLib-GObject-WARNING **: specified instance size for type 'ShellEmbeddedWindow' is smaller than the parent type's 'GtkWindow' instance size
(lt-gnome-shell:5650): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
Invalid GType function: 'shell_embedded_window_get_type'
** (lt-gnome-shell:5650): ERROR **: Failed to extract GType data: Function 'shell_embedded_window_get_type' returned G_TYPE_INVALID
Command '['./gnome-shell', '--introspect-dump=/tmp/nix-build-gnome-shell-3.10.2.1.drv-1/tmp-introspectaPbggB/functions.txt,/tmp/nix-build-gnome-shell-3.10.2.1.drv-1/tmp-introspectaPbggB/dump.xml']' returned non-zero exit status -5
To test it out, checkout gnome3/gnome-shell
branch and run nix-build -A gnome3.gnome_shell
Fixed in a7d0a53d9ed7f74a206dcda2c36d433e030f6822.
Above commit also removed a bunch of run-time dependency problems for gnome-shell. Following errors/warnings are left to be addressed before we see a working gnome-shell+mutter in action: http://bpaste.net/show/172250/
This looks rather like some problem in virtualbox OpenGL setup...
libGL error: failed to load driver: vboxvideo
Among other things, indeed :)
Just pushed very basic gnome3 support. Try it out:
desktopManager.default = "gnome3";
desktopManager.gnome3.enable = true;
@iElectric: Cool! I will try!
Next major milestone to fix is #1700
@bjornfor channels should have all the updates for gnome3.
Do we have any resolutions on how to handle loading GTK+ modules at run-time? I'm currently dealing with IM modules, which will be installed by IM packages to their $out/lib/gtk-3.0/3.0.0/immodules/
. GTK+ applications also need the environment variable GTK_IM_MODULE_FILE
point to a cache file generated by gtk-query-immodules-3.0
to find them. My current proposal is:
GTK_IM_MODULE_FILE=$(x=($NIX_PROFILES) ; IFS=: ; echo "${x[*]/%//lib/gtk-3.0/3.0.0/immodules.cache}")
individually. The current solution seems to be hard-coding everything into environment.profileVariables, but this seems less ideal and probably doesn't work in this case since GTK+ 2/3 applications need different caches."/lib/gtk-3.0/3.0.0/immodules"
needs to be added to environment.pathsToLink
.$out/bin/gtk-query-immodules-3.0 > $out/lib/gtk-3.0/3.0.0/immodules.cache
to build the cache here. This is tricky because gtk-query-immodules-3.0
won't be symlink'ed into $out/bin
unless pkgs.gnome3.gtk
is in environment.systemPackages
, but we need run it if any single application installed on the system depends on GTK.Any thoughts?
@PkmX I believe noone bothered with that yet. Seems to be similar to gschemas.compiled thing.
If I understand correctly apps need GTK_IM_MODULE_FILE
at runtime set with a path to a cached file of all immodules? If so, we should probably have an activation script for nixos when gtk is installed that would collect files. I think @vcunat said he has on TODO to do something similar for themes/icons
Yes, this issue seems to be pushing up through my TODO fast this month, after being there for a year at least :-) I think nixos isn't enough, as we want user envs as well. Various re-generating could be plugged into my planned scheme, but beware of using these system/profile-wide paths -- e.g. because of gstreamer and gio modules on them I have crashes (not matching versions and bad/no check on loading them).
Also, if we find a good way of auto-detecting similar run-time dependencies, it would be nice to have some advanced analogy of autoreconfHook
, which would auto-wrap the affected executables some time around fixupPhase.
gnome-system-log and gnome-screenshot packaged
About "Control center is not opened when clicking the icon on settings", I'm able to open it when clicking on the Settings icon from the activity, and also from the icon in the logout menu on the top right.
gupnp and gupnp-igd are already packaged in nixpkgs
Right, that's why I didn't add it at the first place.
mimeinfo.cache
decides the priority, however the file is created in system-path
by update-desktop-database
. See #2315 I'm not sure where this is set, but I'm getting user+system-installed stuff in menus (perhaps xfce startup?).
echo $XDG_DATA_DIRS
$HOME/.nix-profile/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
Right @vcunat . Though icons are not found for some reason, and applications are not found when gnome-shell is running, a restart is needed. Overall it's ok for now.
@lethalman: XDG spec for icons (and maybe others) requires to check the mtime of each top-level icon directory every five seconds as a way to detect of changes. Unfortunately, that's useless for us, as we use nix-store dirs, where the mtime values are always the same.
@vcunat yes, however also after restarting I don't see icons of user-installed applications.
Yes, I'm fairly sure that's because user-env doesn't regenerate the gtk icon cache (one from some random package gets typically in there instead). System env has a hard-coded hack to regenerate it.
With cheese
there is a problem of including gudev. Tried smth like https://gist.github.com/11142008 (unfinal due to gudev trouble) but no result.
@jagajaga $PKG_CONFIG is not set in the configure, and even setting it from the nix expr it's not picked up. The configure.ac or build-aux must be doing something weird with $PKG_CONFIG.
Proposal for gdk-pixbuf loaders and im modules @PkmX . First note that GDK_PIXBUF_MODULE_FILE and GTK_IM_MODULE_FILE are not paths, but a single file. I prefer wrapping programs instead of doing nixos activation for two reasons:
The current approach to GDK_PIXBUF_MODULE_FILE has the following drawbacks:
This approach also has some advantages:
Proposal: gdk-pixbuf-loaders
{ stdenv, gdk_pixbuf, librsvg }:
stdenv.mkDerivation {
name = "gdk-pixbuf-loaders";
builder = builtins.toFile "builder.sh" ''
cat "${gdk_pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" > $out
cat "${librsvg}/lib/gdk-pixbuf/loaders.cache" >> $out
'';
}
Then wrap with --set GDK_PIXBUF_MODULE_FILE "${gdk-pixbuf-loaders}"
.
By default loaders will be gdk_pixbuf and librsvg. If we ever need more loaders etc., I don't think that's a problem, we can fix / conditionate the derivation.
Disadvantage: $GDK_PIXBUF_MODULE_FILE is not known at build time for some packages needing it (which should be a few packages I hope), unless:
Whether to choose between 1 or 2 depends on how many packages rely upon the $GDK_PIXBUF_MODULE_FILE variable being available at build time.
This applies to gtk im modules as well.
@jagajaga the problem is that cheese requires pkg-config 0.24, while nixpkgs has 0.23.
@lethalman why don't we update it? :)
@jagajaga pkgconfig is basically used by all packages of nixpkgs, do you want the responsibility to break everything? :P I'd start with a pkgconfig_24 = ..../0.24.nix; first, and see that it works. There's no hurry in updating it for all the packages.
@jagajaga: It's not so easy. We probably want a patch that hasn't been ported to newer versions AFAIK (I tried to search months ago, but I haven't found a port). See #292 discussion.
@jagajaga now pkgconfig 0.28 is packaged, cheese can be packaged
@lethalman thx. Gonna do it.
@edolstra @vcunat I'd apprecciate your comment about https://github.com/NixOS/nixpkgs/issues/247#issuecomment-41255168 :)
pixbuf loaders, state: (correct me if I'm wrong, please) It is another instance of the "plugin problem" we often encounter. However, this one is special, as typically apps only need the loaders distributed with the library itself (and no variable setting is needed to find them as long as we have GDK_PIXBUF_LIBDIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
on its place). The only other common loader I found is from librsvg which is used very much in gnome3 stuff. (I tried also searching for other loaders in Ubuntu http://packages.ubuntu.com/search?suite=trusty&arch=any&mode=filename&searchon=contents&keywords=libpixbufloader .)
When it's this simple, I think the best trigger is just having librsvg in build inputs. That could e.g. define that GDK_PIXBUF_MODULE_FILE
variable via an env hook, so it's available both at build- and run-time. (No changes needed in expressions using this variable.) As you say, that extra loaders.cache
in each build seems superfluous. We can have just one file, probably in librsvg output directly. We could again generalize that later if need be, but ATM splitting the loaders.cache generation would complicate its export via env hooks.
As for IM modules, I haven't really encountered those yet. I guess it will be different -- more like the usual "plugin problem" -- with a larger range of choice, different people (not packages) wanting different plugins...
Quick guide on gnome3 https://wiki.gnome.org/SysAdminGuide
List of issues to be fixed:
nix-env
are missing from the gnome-shell activity [possibly fixed]Some journalctl warnings to cleanup:
org.gnome.Calculator.SearchProvider[12182]: Error: ErrorCode.UNKNOWN_VARIABLE
[possibly fixed]org.gnome.Characters.BackgroundService[4183]: (gjs:5031): Gjs-WARNING **: JS ERROR: Error: Requiring GjsPrivate, version none: Typelib file for namespace 'Gtk', version '3.0' not found
[possibly fixed]Missing core packages left to be packaged:
seedList of apps to be packaged:
gnome-initial-setup(not nixos friendly)