From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNb9V-00011Y-VA for guix-patches@gnu.org; Fri, 16 Nov 2018 05:15:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNb9S-00069V-1x for guix-patches@gnu.org; Fri, 16 Nov 2018 05:15:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNb9R-000693-Us for guix-patches@gnu.org; Fri, 16 Nov 2018 05:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNb9R-00021Q-J2 for guix-patches@gnu.org; Fri, 16 Nov 2018 05:15:01 -0500 Subject: [bug#33386] [PATCH 1/2] gnu: gajim: Add support for Guix packaged plugins. Resent-Message-ID: References: <87d0r7e8ox.fsf@lassieur.org> <20181114195553.27293-1-clement@lassieur.org> <20181115191903.7f3db09b@scratchpost.org> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <20181115191903.7f3db09b@scratchpost.org> Date: Fri, 16 Nov 2018 11:13:58 +0100 Message-ID: <87efblz5w9.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 33386@debbugs.gnu.org Hi Danny, Danny Milosavljevic writes: > Hi Cl=C3=A9ment, > > On Wed, 14 Nov 2018 20:55:52 +0100 > Cl=C3=A9ment Lassieur wrote: > >>+ (add-after 'unpack 'add-plugin-dirs >>+ (lambda _ >>+ (substitute* "gajim/common/configpaths.py" >>+ (("_paths\\['PLUGINS_USER'\\]") >>+ (string-append >>+ "_paths['PLUGINS_USER'],os.path.expanduser" >>+ "('~/.guix-profile/share/gajim/plugins')"))) >>+ #t)) > > [...] > >> + (pythonpath (string-append >> + "$HOME/.guix-profile/lib/python" >> + ,(version-major+minor >> + (package-version python)) >> + "/site-packages"))) > > > Hmm, don't both of these hard-code one profile? I don't understand what this means. > I thought one can use any number of profiles - and this patch could > definitely pick from the wrong one. What do you mean? This patch just adds the Guix packaged plugins to the list of plugin dirs. > Why isn't the PLUGINS_USER setting enough? Because it doens't know about Guix installed plugins. It doesn't look in ~/.guix-profile/whatever. Only at /gnu/store/...-gajim/something and ~/.local/share/gajim/something. > Can't it be provided via environment variables? (set by the profile) Gajim doesn't seem to support customizing plugin dirs through environment variables, which is why I edited its code. > Also, shouldn't PYTHONPATH already have been set by the profile? For > me, it is set (to ~/.guix-profile/lib/python3.6/site-packages) when I > log in. It shouldn't be in the profile if python isn't installed. Cl=C3=A9ment