From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Packaging IceCat extensions with Guix Date: Thu, 12 Jan 2017 21:18:02 -0500 Message-ID: <87h953aejp.fsf@netris.org> References: <87o9zbafux.fsf@netris.org> <87ziiw5bzt.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRrRj-00067I-7j for guix-devel@gnu.org; Thu, 12 Jan 2017 21:18:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRrRf-0004H8-9G for guix-devel@gnu.org; Thu, 12 Jan 2017 21:18:27 -0500 Received: from world.peace.net ([50.252.239.5]:57972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRrRf-0004Ge-4K for guix-devel@gnu.org; Thu, 12 Jan 2017 21:18:23 -0500 In-Reply-To: <87o9zbafux.fsf@netris.org> 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" To: Marius Bakke Cc: guix-devel@gnu.org I wrote: > Marius Bakke writes: > >> I read somewhere that Debian packages certain Firefox extensions. I >> tried doing the same with Guix, but haven't been able to get IceCat to >> load extensions from a directory. >> >> The attached (outdated!) patch adds the "uBlock" XPI to >> /lib/icecat/extensions. I've tried symlinking this to >> "standard" system folders (from IceCat source code), and disabled >> unsigned extensions, but no luck so far. Maybe someone more familiar >> with IceCat internals can try it? > > The relevant code is in toolkit/xre/nsXREDirProvider.cpp. It looks to > me like the functions to patch are GetSystemExtensionsDirectory and > AppendSysUserExtensionPath. > > In GetSystemExtensionsDirectory, I guess the strings > "/usr/lib/mozilla/extensions" and "/usr/lib64/mozilla/extensions" should > both be changed to "/run/current-system/profile/lib/mozilla/extensions". Also, in GetFile, "/usr/share/mozilla/extensions" should be changed to "/run/current-system/profile/share/mozilla/extensions". Here's another file that needs patching: xpcom/io/nsAppFileLocationProvider.cpp In nsAppFileLocationProvider::GetFile, "/usr/lib/mozilla/plugins" and "/usr/lib64/mozilla/plugins" should be changed to "/run/current-system/profile/lib/mozilla/plugins". Note that the MOZ_PLUGIN_PATH environment variable is consulted here. Here are a couple of other files that might be relevant: toolkit/mozapps/extensions/AddonManager.jsm toolkit/mozapps/extensions/internal/XPIProvider.jsm Mark