From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Packaging IceCat extensions with Guix Date: Thu, 12 Jan 2017 20:12:06 +0100 Message-ID: <87ziiw5bzt.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRknF-0000YO-6P for guix-devel@gnu.org; Thu, 12 Jan 2017 14:12:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRknB-0003Km-VP for guix-devel@gnu.org; Thu, 12 Jan 2017 14:12:13 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45120) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRknB-0003KS-LZ for guix-devel@gnu.org; Thu, 12 Jan 2017 14:12:09 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DD1F820C07 for ; Thu, 12 Jan 2017 14:12:08 -0500 (EST) Received: from localhost (unknown [188.113.81.93]) by mail.messagingengine.com (Postfix) with ESMTPA id 7824D7E34D for ; Thu, 12 Jan 2017 14:12:08 -0500 (EST) 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: guix-devel@gnu.org --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi Guix, 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? I would love to have my favourite extensions managed by Guix! --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlh31QcACgkQoqBt8qM6 VPp/Vwf+KfwZ9VH1EyvaFRhiYROtSrdjKbjUbjfFWrFh9LlKRircui4bLFomSzMZ clYrddawhCc5HR67s8JfmKK69kH0aRDLTAgyhwdbj1expH25T983ESUJHfumRfqp TLP28bD1pK+fu8GoHYu2bypwVgM5qSnVUf3rMa/42jRokkVxlZoFw7mw4UdbG/gw 5W6kDIUedwoXcxfVe4iA6/wwQaW36hDsam6b51/Z4vgaE4zajFtDNB2ed7y1mC1J sulHWZnDFCi1ENtqnICIN9zB7P7Z52bkGlGpRwLQNrQFgxhtfmZzabityuOjzxrk HYkzt7VuWJas5tSPNWRLgZC64p5amw== =zh7t -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-ublock.patch Content-Transfer-Encoding: quoted-printable >From 3a1bc1a489c5f7cd624c661a8887bf2e89ea74b2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 1 Nov 2016 10:33:52 +0000 Subject: [PATCH] gnu: Add ublock. --- gnu/packages/web-plugins.scm | 114 +++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 114 insertions(+) create mode 100644 gnu/packages/web-plugins.scm diff --git a/gnu/packages/web-plugins.scm b/gnu/packages/web-plugins.scm new file mode 100644 index 000000000..e124b8e74 --- /dev/null +++ b/gnu/packages/web-plugins.scm @@ -0,0 +1,114 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2016 Marius Bakke +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages web-plugins) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (guix packages) + #:use-module (gnu packages python) + #:use-module (gnu packages zip)) + +(define uassets + (package + (name "uassets") + (version "8f505b07572f0ed35d3bfec6ba4c9058f4270ae7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/uBlockOrigin/uAssets.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "154i7p2qa2jq5907n9bqsy9bh2l2iiynhd7x9s4d6dabwfq7aa5n")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (copy-recursively (assoc-ref %build-inputs "source") + (assoc-ref %outputs "out")) + #t))) + (synopsis "Filter lists and rulesets for uBlock and uMatrix") + (description + "Resources for uBlock Origin, uMatrix: static filter lists, +ready-to-use rulesets, etc.") + (home-page "https://github.com/uBlockOrigin/uAssets") + (license license:gpl3))) ; TODO: verify + +(define-public ublock + (package + (name "ublock") + (version "1.9.16") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/gorhill/uBlock/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0460sh05ahxl6539pfxbgaf1ibxxi3c656pxazwnppln2zaiigfz")))) + (build-system gnu-build-system) + ;; We use gnu-build-system to benefit from unpack and + ;; source patching, but won't use any standard phases. + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'copy-assets + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "uassets") + "../uAssets") + #t)) + (delete 'configure) + (replace 'build + (lambda _ + (zero? (system* "./tools/make-firefox.sh" "all")) + ;(zero? (system* "./tools/make-firefox.sh")) + )) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (extdir (string-append + out "/lib/icecat/extensions"))) + ;(mkdir-p extdir) + ;(copy-recursively "dist/build/uBlock0.firefox" extdir) + (install-file "dist/build/uBlock0.firefox.xpi" extdir) + #t)))))) + (native-inputs + `(("python" ,python-wrapper) + ("uassets" ,uassets) + ("zip" ,zip))) + (synopsis "Efficient content blocker") + (description + "uBlock Origin is a \"wide spectrum\" blocker for web content. +It can block ads, trackers, malware sites and similar and comes with a +comprehensive pre-configured filter list covering known-bad sites.") + (home-page "https://github.com/gorhill/uBlock") + ;; uBlock is distributed under GPL3+ but includes a handful of + ;; components covered by other licenses. + (license (list license:gpl3+ + license:cc-by-sa3.0 + license:mpl2.0 + ;; The malware hosts list has no proper license and just + ;; includes the text "our list can be used by anyone". + (license:non-copyleft "https://www.malwaredomainlist.co= m/"))))) --=20 2.11.0 --=-=-=--