[PATCH] gnu: Add bypass-paywalls-chromium.

  • Done
  • quality assurance status badge
Details
3 participants
  • Wamm K. D
  • Christopher Baines
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Wamm K. D
Severity
normal
W
W
Wamm K. D wrote on 24 Oct 2022 17:56
(address . guix-patches@gnu.org)(name . Wamm K. D)(address . jaft.r@outlook.com)
BY5PR07MB70296514B048F17BA6C4F35C992E9@BY5PR07MB7029.namprd07.prod.outlook.com
* gnu/packages/browser-extensions.scm (bypass-paywalls-chromium): Add new Chromium extension.
---
gnu/packages/browser-extensions.scm | 63 +++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (80 lines)
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
C
C
Christopher Baines wrote on 16 Mar 2023 19:06
(name . Wamm K. D)(address . jaft.r@outlook.com)
87y1nwwosc.fsf@cbaines.net
"Wamm K. D" <jaft.r@outlook.com> writes:

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

Apologies for the long delay for review of this.

This seems fine to me, although I can't fine anything in the upstream
repository suggesting what the license is. Where did you get that it's
expat licensed?

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmQTW4NfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xc5CBAAp3p15a/o2dOQ0ybGMgbcic2OYrdqWeSB
6UesGoDQNkQVzsti2zdHZV7r3uKZCc8/MdvPdeMqYLoVtq1ciSTAnKCZz2xcYN9x
J6rmf8dGvnRVNTgkf9k38w0JtrDI7KTIZqNucoCnYYCSy/R6EKtvqyEibdBAAtqg
ftQu8y7EGbw4oNg93h5+JdBTnPieLmFEqMcfHPfMNrHlaI+VTN0lEZRj+0K6LOJ7
r+SZLWuXmuMz5wuM/iBArQSv1FMX0hMRoGn5AtNDPZN1qFFoHk0L0Gyrr2h6pYMR
tS+Iu+Ko75fkTxyVSp01jh3aaDCEp9Gi4JwgvwSvhB+gKeTqOvaz5dbZNGEr1gVE
DnGEYyE1gmNSAWlWJHs7g9vwdXa0V5JhNqO6E3wAGaYJTG7xYW2c7Pv15O2d2cHl
qcmiGsgtNn8H4vn4Ug0/DomBpQI+cZi/JnDOIZwkdX2Bjg1ySyYwy1CCz1qGEPIc
/VsJjToMDWyqFKPHrBVJ62FYSNjkt78HlHXRv6U4rgrsZvFu1B7v2Bu2LYIgCga1
jtxpj3trM9MObKu54kvAutS2oQELFaxu999NszVaDz89Hqv5miUVeYNwoUVGNE3p
6cphhFoEwKvH2u61ju2SQhuc9rGNXEE9aSRMVj6Ml+VRZnxRvtG4dA08rSl9Iciz
sJ0jD78aHVs=
=N5DM
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 21 Mar 2023 13:33
control message for bug #58761
(address . control@debbugs.gnu.org)
87v8ius2r6.fsf@gmail.com
tags 58761 + moreinfo
quit
M
M
Maxim Cournoyer wrote on 21 Mar 2023 14:03
Re: bug#58761: [PATCH] gnu: Add bypass-paywalls-chromium.
(name . Christopher Baines)(address . mail@cbaines.net)
87ileus1cj.fsf_-_@gmail.com
Hi,

Christopher Baines <mail@cbaines.net> writes:

Toggle quote (13 lines)
> "Wamm K. D" <jaft.r@outlook.com> writes:
>
>> * gnu/packages/browser-extensions.scm (bypass-paywalls-chromium): Add new Chromium extension.
>> ---
>> gnu/packages/browser-extensions.scm | 63 +++++++++++++++++++++++++++++
>> 1 file changed, 63 insertions(+)
>
> Apologies for the long delay for review of this.
>
> This seems fine to me, although I can't fine anything in the upstream
> repository suggesting what the license is. Where did you get that it's
> expat licensed?

I've checked the git log of the repo, and an Expat LICENSE file was
added in 066f5e1656cd87e2e443bc05458fdb109e405f34 and then removed later
in:

Toggle snippet (7 lines)
commit b84c534180ab1042011836b5b9f38abacd2d2616
Author: Adam <36013816+iamadamdev@users.noreply.github.com>
Date: Sun Apr 19 16:08:53 2020 -0700

File directory structure update

Issues cannot be created on their tracker unless we've already
contributed to their repo, so I've tried submitting a PR instead [0], but
that also resulted in:

Toggle snippet (4 lines)
An owner of this repository has limited the ability to open a pull
request to users that have contributed to this repository in the past.

Which is unfortunate.

Thus, I'm closing this issue. Feel free to re-open if you could contact
the author and remediate the license situation.


--
Thanks,
Maxim
Closed
?