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 20:49:42 -0500 Message-ID: <87o9zbafux.fsf@netris.org> References: <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]:40635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRr0L-0002oZ-Am for guix-devel@gnu.org; Thu, 12 Jan 2017 20:50:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRr0I-0008Uv-9p for guix-devel@gnu.org; Thu, 12 Jan 2017 20:50:09 -0500 Received: from world.peace.net ([50.252.239.5]:57744) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRr0I-0008Ul-4C for guix-devel@gnu.org; Thu, 12 Jan 2017 20:50:06 -0500 In-Reply-To: <87ziiw5bzt.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (Marius Bakke's message of "Thu, 12 Jan 2017 20:12:06 +0100") 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 Hi Marius, 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". 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