[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Packaging IceCat extensions with Guix
From: |
Mark H Weaver |
Subject: |
Re: Packaging IceCat extensions with Guix |
Date: |
Thu, 12 Jan 2017 21:18:02 -0500 |
I wrote:
> Marius Bakke <address@hidden> 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
>> <guix-profile>/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