From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: wrap-program Date: Sat, 27 Sep 2014 11:20:19 +0200 Message-ID: <87a95lju7g.fsf@gnu.org> References: <87y4tliahf.fsf@gnu.org> <87r3zabohm.fsf@gnu.org> <8738bp16k4.fsf@gnu.org> <87lhpgoxjp.fsf@gnu.org> <87fvfm8m4f.fsf@gnu.org> <87fvfm595n.fsf@gnu.org> <874mw0umtv.fsf_-_@gnu.org> <87tx3yi3ky.fsf@yeeloong.lan> <87egv15w7s.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXoB4-0002TU-Sk for guix-devel@gnu.org; Sat, 27 Sep 2014 05:20:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXoAy-000338-0j for guix-devel@gnu.org; Sat, 27 Sep 2014 05:20:30 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:38608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXoAx-000331-JF for guix-devel@gnu.org; Sat, 27 Sep 2014 05:20:23 -0400 In-Reply-To: (Federico Beffa's message of "Fri, 26 Sep 2014 22:09:15 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: guix-devel@gnu.org Federico Beffa skribis: > 1. GSettings schemas: More than schemas compilation, the problem is that > the schemas are by default expected to be in $datadir/glib-2.0/schemas > (with $datadir usually being /usr/share). In spite of this, other > directories can be specified with the help of the environment variable > $XDG_DATA_DIRS. Since at glib-2.0 compiled time we can't know the path > of future application installations, we may want to define Right, that=E2=80=99s one of the reasons why the =E2=80=98glib=E2=80=99 pac= kage defines it as its search path (see glib.scm.) > 2. gtk-3.0 modules: gtk+ looks for modules (like libcanberra.so) in > locations specified by > > a. $GTK_PATH, > > b. $libdir/gtk-3.0/modules, with $libdir being the one specified at > gtk+-3.0 ./configure time OR $GTK_EXE_PREFIX/lib. > > Option a. is inconvenient because that variable is used by both, > gtk+-2.0 and gtk+-3.0, easily leading applications compiled with one > version to find incompatible libraries. > > Option b. is more attractive. Again, at compile time we do not know the > location of future modules installations: Take emacs: it looks in the > gtk+-3.0 directory $libdir/gtk-3.0/modules. However, it is looking for > a module installed by libcanberra which is not even an input to the > emacs package. For this reason we should probably define > > GTK_EXE_PREFIX=3D"$HOME/.guix-profile" That would be easy and could be defined in /etc/profile on the standalone system. However that would force users to install GTK+ in their profile so that the modules it comes with are found, right? This would be inconvenient. > We may just want to check that: (i) paths defined in environment > variables are not duplicated by 'wrap-program' definitions (wrap > launched by wrap) and (ii) if the variable is already defined (for "non > guix" reasons), we may want to append the existing value. Yes, this is the preferred solution, I think (and I think it=E2=80=99s this= case it=E2=80=99s OK to have these two variables leak in sub-processes, as discu= ssed with Mark.) However, we=E2=80=99d like to factorize the extra phase that d= oes the wrapping, so we don=E2=80=99t repeat it for each and every program. > The only problem I see right now is if a program is launched by a user > which does not have $HOME/.guix-profile (like a service). In that case > there could be a default profile. I think these are mostly GUIs, unlikely to be launched by a service. > This could also serve the second purpose of providing initial default > applications (like guix itself!) to all users on "guix on distro" > systems. Hmm what do you mean? Thanks, Ludo=E2=80=99.