[Nix-dev] Pls help with installation of gtk-qt-engine on NixOS

Armijn Hemel armijn at uulug.nl
Wed Jun 6 01:09:25 CEST 2007


hi,

> I built a simple NixOS gkt-based package called Transmission-0.72, which
> works  well. Noticing how ugly the Gtk2 apps look under KDE, I then tried to
> make a package from gtk-qt-engine-0.7 for KDE, which compiled fine, but
> failed in the install step with an error:
> 
> mkdir: cannot create directory
> `/nix/store/yz24...-gtk+-2.8.20/share/gtk-qt-engine': Permission denied
> 
> On Debian, gtk-qt-engine installs in /usr/lib/gtk-2.0/2.4.0/engines, and
> apparently the installer tries to do something similar here. As the nix-store
> of gtk2 is read only, the gtk-qt-engine obviously has to go somewhere else.

Yes. This is true. Apparently it wants to install it into the same
directory of gtk+.

> How do you usually solve problems like this, where one application wants to
> install parts of itself into the directory tree of another application? Do
> any of the build-support scripts apply to this?

The best is to use $out, which is a variable that is set at buildtime
and which you can use (might need some fiddling). I suppose that
configure sets something like INSTALLDIR=$GTK_PREFIX or similar.

Combining can be done in various ways. Probably the cleanest way is to
create a wrapper package that takes both packages as an argument and
creates a new package, with for example symlinks, or environment
variables.

Eelco, the Nix guru, will probably have some better insights into what
would be the most correct way to do that :-)

armijn

-- 
-------------------------------------------------------------------------
armijn at uulug.nl | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
-------------------------------------------------------------------------




More information about the nix-dev mailing list