unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Wamm K. D" <jaft.r@outlook.com>
To: 58761@debbugs.gnu.org
Cc: "Wamm K. D" <jaft.r@outlook.com>
Subject: [bug#58761] [PATCH] gnu: Add bypass-paywalls-chromium.
Date: Mon, 24 Oct 2022 10:56:07 -0500	[thread overview]
Message-ID: <BY5PR07MB70296514B048F17BA6C4F35C992E9@BY5PR07MB7029.namprd07.prod.outlook.com> (raw)

* gnu/packages/browser-extensions.scm (bypass-paywalls-chromium): Add new Chromium extension.
---
 gnu/packages/browser-extensions.scm | 63 +++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/browser-extensions.scm b/gnu/packages/browser-extensions.scm
index db27101b9b..d2bf4f1480 100644
--- a/gnu/packages/browser-extensions.scm
+++ b/gnu/packages/browser-extensions.scm
@@ -17,6 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages browser-extensions)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix build-system copy)
@@ -109,3 +110,65 @@ (define ublock-origin
 
 (define-public ublock-origin/chromium
   (make-chromium-extension ublock-origin "chromium"))
+
+(define bypass-paywalls
+  (package
+    (name "bypass-paywalls")
+    (version "1.8.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/iamadamdev/bypass-paywalls-chrome")
+                    (commit (string-append "v" version))))
+              (sha256 (base32
+                       "103917jsn6py3wi4gw216rs6winrd1wkkag1zqxczkf2y7c9bndb"))))
+    (build-system gnu-build-system)
+    (native-inputs (list p7zip))
+    (outputs '("xpi" "firefox" "chromium"))
+    (arguments
+     (list
+      #:phases #~(modify-phases (map (lambda (phase)
+                                       (assq phase %standard-phases))
+                                     '(set-paths unpack patch-source-shebangs))
+                   (add-after 'patch-source-shebangs 'prepare-build
+                     (lambda _
+                       (chdir "build")
+
+                       (mkdir-p "firefox")
+                       (mkdir-p "chromium")
+
+                       (substitute* "build.sh"
+                         (("# Remove temp files")
+                          "cp $FF_FILES firefox
+mv firefox/temp-ff-manifest.json firefox/manifest.json
+mv firefox/temp-background.js    firefox/background.js
+mv firefox/temp-options.html     firefox/options.html
+mv firefox/temp-popup.html       firefox/popup.html
+
+cp $CH_FILES chromium
+mv chromium/temp-chrome-manifest.json chromium/manifest.json
+mv chromium/temp-background.js        chromium/background.js
+mv chromium/temp-options.html         chromium/options.html
+mv chromium/temp-popup.html           chromium/popup.html
+
+# Remove temp files"))))
+                   (add-after 'prepare-build 'build
+                     (lambda _
+                       (invoke "./build.sh")))
+                   (add-after 'build 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((firefox (assoc-ref outputs "firefox"))
+                             (xpi (assoc-ref outputs "xpi"))
+                             (chromium (assoc-ref outputs "chromium")))
+                         (install-file "output/bypass-paywalls.xpi"
+                                       (string-append xpi "/lib/mozilla/extensions"))
+                         (copy-recursively "firefox" firefox)
+                         (copy-recursively "chromium" chromium)))))))
+    (home-page "https://github.com/iamadamdev/bypass-paywalls-chrome")
+    (synopsis "Bypass Paywalls web-browser extension")
+    (description "Bypass Paywalls displays web pages without their paywalls, for
+IceCat and ungoogled-chromium.")
+    (license license:expat)))
+
+(define-public bypass-paywalls/chromium
+  (make-chromium-extension bypass-paywalls "chromium"))
-- 
2.38.0





             reply	other threads:[~2022-10-24 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 15:56 Wamm K. D [this message]
2023-03-16 18:06 ` [bug#58761] [PATCH] gnu: Add bypass-paywalls-chromium Christopher Baines
2023-03-21 13:03   ` bug#58761: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR07MB70296514B048F17BA6C4F35C992E9@BY5PR07MB7029.namprd07.prod.outlook.com \
    --to=jaft.r@outlook.com \
    --cc=58761@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).