GNU bug report logs - #49499
[PATCH] gnu: add the tos;dr initiative's extension

Previous Next

Package: guix-patches;

Reported by: terramorpha <at> cock.li

Date: Fri, 9 Jul 2021 19:34:01 UTC

Severity: normal

Tags: patch

Merged with 49582

To reply to this bug, email your comments to 49499 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49499; Package guix-patches. (Fri, 09 Jul 2021 19:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to terramorpha <at> cock.li:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 09 Jul 2021 19:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: terramorpha <at> cock.li
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: add the tos;dr initiative's extension
Date: Fri, 09 Jul 2021 15:33:08 -0400
This is a package definition for the terms of service;didn't read 
initiative. It is useful to easily
know the privacy issues with whatever website the user is using.

diff --git a/gnu/packages/browser-extensions.scm 
b/gnu/packages/browser-extensions.scm
index a6120baf96..6cbe77b9c3 100644
--- a/gnu/packages/browser-extensions.scm
+++ b/gnu/packages/browser-extensions.scm
@@ -121,3 +121,41 @@ ungoogled-chromium.")

 (define-public ublock-origin/chromium
   (make-chromium-extension ublock-origin "chromium"))
+
+(define tosdr
+  (package
+   (name "tosdr")
+   (version "4.1.1")
+   (source (origin
+             (uri
+              (git-reference (url 
"https://github.com/tosdr/browser-extensions.git")
+                             (commit version)))
+             (sha256 (base32 
"0wz31f9rz087yw1a7cdhdgqvgnhbk569jywv846n122m4bpk3yw0"))
+             (method git-fetch)))
+   (inputs `(("bash" ,bash)
+             ("coreutils" ,coreutils)
+             ("node" ,node)
+             ("zip" ,zip)
+             ("unzip" ,unzip)))
+   (arguments
+    `(#:builder
+      (begin
+        (use-modules (guix build utils))
+        (set-path-environment-variable "PATH"
+                                      '("bin")
+                                      (map cdr %build-inputs))
+        (copy-recursively (assoc-ref %build-inputs "source") ".")
+        (invoke "sh" "./build.sh")
+        (invoke "unzip" "dist/chrome.zip" "-d" %output)
+        #t)
+      #:modules ((guix build utils))))
+   (build-system trivial-build-system)
+   (synopsis "extension for the Terms of Service; Didn't Read 
initiative")
+   (description "This extension informs you instantly of your rights 
online by
+showing an unintrusive icon in the toolbar.  You can click on this icon 
to get
+summaries from the Terms of Service; Didn't Read initiative.")
+   (license license:agpl3)
+   (home-page "https://tosdr.org/")))
+
+(define-public tosdr-chromium
+  (make-chromium-extension tosdr))




Information forwarded to guix-patches <at> gnu.org:
bug#49499; Package guix-patches. (Thu, 22 Jul 2021 21:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 49499 <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: terramorpha <at> cock.li
Cc: 49499 <at> debbugs.gnu.org
Subject: Re: bug#49499: [PATCH] gnu: add the tos;dr initiative's extension
Date: Thu, 22 Jul 2021 14:49:36 -0700
Hi,

Thanks for the patch. Unfortunately I am unable to apply your patch; it
looks like your mail client wrapped long lines which broke the
patch. (That's why most of us send patches with `git send-email`, to
avoid this problem.)

I also have a few suggestions for your patch, annotated below...

terramorpha <at> cock.li writes:

> This is a package definition for the terms of service;didn't read initiative. It
> is useful to easily
> know the privacy issues with whatever website the user is using.
>
> diff --git a/gnu/packages/browser-extensions.scm
> b/gnu/packages/browser-extensions.scm
> index a6120baf96..6cbe77b9c3 100644
> --- a/gnu/packages/browser-extensions.scm
> +++ b/gnu/packages/browser-extensions.scm
> @@ -121,3 +121,41 @@ ungoogled-chromium.")
>
>  (define-public ublock-origin/chromium
>    (make-chromium-extension ublock-origin "chromium"))
> +
> +(define tosdr
> +  (package
> +   (name "tosdr")
> +   (version "4.1.1")
> +   (source (origin
> +             (uri
> +              (git-reference (url
> "https://github.com/tosdr/browser-extensions.git")

This line is too long and should be wrapped.

> +                             (commit version)))
> +             (sha256 (base32
> "0wz31f9rz087yw1a7cdhdgqvgnhbk569jywv846n122m4bpk3yw0"))

Likewise.

> +             (method git-fetch)))
> +   (inputs `(("bash" ,bash)
> +             ("coreutils" ,coreutils)
> +             ("node" ,node)
> +             ("zip" ,zip)
> +             ("unzip" ,unzip)))

These should be native-inputs rather than inputs, since they are just
used in building. Perhaps consider just using copy-build-system instead,
to avoid manually including these inputs and setting PATH below.

You can look at the ublock-origin package as an example (though I would
use the copy-build-system instead, adding back in a 'build phase, either
removing the "rm -rf build" from `build.sh` beforehand or unzipping the
zip immediately afterwards).

> +   (arguments
> +    `(#:builder
> +      (begin
> +        (use-modules (guix build utils))
> +        (set-path-environment-variable "PATH"
> +                                      '("bin")
> +                                      (map cdr %build-inputs))
> +        (copy-recursively (assoc-ref %build-inputs "source") ".")
> +        (invoke "sh" "./build.sh")
> +        (invoke "unzip" "dist/chrome.zip" "-d" %output)
> +        #t)
> +      #:modules ((guix build utils))))
> +   (build-system trivial-build-system)
> +   (synopsis "extension for the Terms of Service; Didn't Read initiative")

The synopsis should begin with a capital letter.

> +   (description "This extension informs you instantly of your rights online by
> +showing an unintrusive icon in the toolbar.  You can click on this icon to get
> +summaries from the Terms of Service; Didn't Read initiative.")
> +   (license license:agpl3)
> +   (home-page "https://tosdr.org/")))
> +
> +(define-public tosdr-chromium
> +  (make-chromium-extension tosdr))

--
Sarah




Merged 49499 49582. Request was from Sarah Morgensen <iskarian <at> mgsn.dev> to control <at> debbugs.gnu.org. (Sun, 25 Jul 2021 02:33:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.