guix-devel
[Top][All Lists]
Advanced

[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 20:49:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Marius,

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".

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]