[Nix-dev] Qt Oxygen style in nixpkgs

Kirill Elagin kirelagin at gmail.com
Sat Mar 14 00:38:19 CET 2015


On Sat, Mar 14, 2015 at 1:34 AM Thomas Tuegel <ttuegel at gmail.com> wrote:

> Here's what's going on:
>
> Nix sets RPATH for libraries and executables so they can find the
> libraries they depend on. Your distro's libraries, like oxygen.so,
> will not do this; instead, they rely on the interpreter ld.so to find
> the right libraries on the system path. Because oxygen.so is being
> loaded as a plugin, it uses the interpreter of whatever program loads
> it. So, when you use your distro's qtconfig, it uses your distro's
> ld.so and all is well. But, when you use the nixpkgs qtconfig, it uses
> the nixpkgs ld.so. The nixpkgs ld.so does not have libkdeui.so.5 in
> its system path because the system path is only
> /nix/store/<hash>-glibc-2.20/lib (otherwise, glibc would have to
> depend on every package in the system!).
>
> Note that in this scenario, there is no problem with distro-installed
> programs using the nixpkgs oxygen.so, so we should fix this by making
> everything use the nixpkgs Oxygen. You should be able to do this by
> setting the environment variable
> QT_PLUGIN_PATH="$HOME/.nix-profile/lib/qt4/plugins:$HOME/
> .nix-profile/lib/kde4/plugins:$HOME/.nix-profile/lib/qt5/plugins".
> Technically, you only need the first path in the list in this case,
> but I wouldn't want you to be surprised later when something else
> breaks!
>
> --
> Thomas Tuegel
>

Thomas, thanks for that, now I see what was going on.

Turns out, my distro exports `QT_PLUGIN_PATH=/usr/lib64/kde4/plugins`. Also
turns out that Oxygen is part of KDE so I have to install KDE from nixpkgs
now (I wanted to do this one day anyway, huh).

However I still have a question. For some reason Qt falled back not to a
“built-in” style but for the Phase style plugin and seems that this one
worked fine. Do you have an idea why? Is that just a happy coincidence?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150313/f7c54070/attachment.html 


More information about the nix-dev mailing list