Hi Marius, Marius Bakke <mba...@fastmail.com> 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". In AppendSysUserExtensionPath, instead of appending ".mozilla" and "extensions" components to the file name, we should append ".guix-profile", "lib", "mozilla", and "extensions". Would you like to work on it? As a temporary hack, icecat is currently looking in ~/.mozilla/extensions, so you could make that a symlink pointing to the appropriate place. > I would love to have my favourite extensions managed by Guix! I agree, wholeheartedly :) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (extdir (string-append > + out "/lib/icecat/extensions"))) s/icecat/mozilla/ Thanks very much for taking this on! Mark