GNU bug report logs - #49582
[PATCH] gnu: Add tosdr-chromium.

Previous Next

Package: guix-patches;

Reported by: Justin Veilleux <justun1011 <at> gmail.com>

Date: Thu, 15 Jul 2021 19:21:01 UTC

Severity: normal

Tags: patch

Merged with 49499

To reply to this bug, email your comments to 49582 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 bug-guix <at> gnu.org:
bug#49582; Package guix. (Thu, 15 Jul 2021 19:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Justin Veilleux <justun1011 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 15 Jul 2021 19:21:02 GMT) Full text and rfc822 format available.

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

From: Justin Veilleux <justun1011 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: [PATCH] gnu: Add tosdr-chromium.
Date: Thu, 15 Jul 2021 14:06:57 -0400
[Message part 1 (text/plain, inline)]
this patch adds the tos;dr initiative's extension
[Message part 2 (text/html, inline)]
[file.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#49582; Package guix. (Sun, 25 Jul 2021 01:25:01 GMT) Full text and rfc822 format available.

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

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: Justin Veilleux <justun1011 <at> gmail.com>
Cc: 49582 <at> debbugs.gnu.org
Subject: Re: bug#49582: [PATCH] gnu: Add tosdr-chromium.
Date: Sat, 24 Jul 2021 18:24:45 -0700
Hi,

Apologies, I didn't see this patch when I sent my previous reply.

This patch applies and builds, but the bulk of my previous suggestions
remain.

Justin Veilleux <justun1011 <at> gmail.com> writes:

> this patch adds the tos;dr initiative's extension
>
> From c6881b9b065cf2a85b604c8a1e5ddbae77822034 Mon Sep 17 00:00:00 2001
> From: terramorpha <terramorpha <at> cock.li>
> Date: Thu, 15 Jul 2021 14:03:19 -0400
> Subject: [PATCH] gnu: Add tosdr-chromium.
>
> * gnu/packages/browser-extensions.scm (tosdr, tosdr-chromium): New variables.
> ---
>  gnu/packages/browser-extensions.scm | 50 ++++++++++++++++++++++++++++-
>  1 file changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/browser-extensions.scm b/gnu/packages/browser-extensions.scm
> index a6120baf96..7a1a5bda69 100644
> --- a/gnu/packages/browser-extensions.scm
> +++ b/gnu/packages/browser-extensions.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2020, 2021 Marius Bakke <marius <at> gnu.org>
> +;;; Copyright © 2021 Justin Veilleux <terramorpha <at> cock.li>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -21,10 +22,14 @@
>    #:use-module (guix git-download)
>    #:use-module (guix build-system copy)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system trivial)
>    #:use-module ((guix licenses) #:prefix license:)
>    #:use-module (gnu build chromium-extension)
>    #:use-module (gnu packages compression)
> -  #:use-module (gnu packages python))
> +  #:use-module (gnu packages python)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages bash)
> +  #:use-module (gnu packages node))
>  
>  (define play-to-kodi
>    (package
> @@ -121,3 +126,46 @@ 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))

Also, these should be spaces, not tabs.

> +         (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 to inform of the important aspects of the terms and
> +conditions of a web service")
> +    (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




bug reassigned from package 'guix' to 'guix-patches'. 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.

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.

Information forwarded to guix-patches <at> gnu.org:
bug#49582; Package guix-patches. (Sun, 25 Jul 2021 15:41:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Justin Veilleux <justun1011 <at> gmail.com>, 49582 <at> debbugs.gnu.org
Subject: Re: bug#49582: [PATCH] gnu: Add tosdr-chromium.
Date: Sun, 25 Jul 2021 17:40:07 +0200
[Message part 1 (text/plain, inline)]
Justin Veilleux schreef op do 15-07-2021 om 14:06 [-0400]:
> +    (inputs
> +     `(("bash" ,bash)
> +       ("coreutils" ,coreutils)

Would "coreutils-minimal" and "bash-minimal" suffice?
Or, more minimalistic,

  (parameterize ((%current-target-system #f))
    `(("bash" ,(canonical-package "bash")
      ("coreutils" ,(canonical-package "bash"))))

Or, more simply, let the inputs be (standard-packages).

> +       ("node" ,node)
> +       ("zip" ,zip)
> +       ("unzip" ,unzip)))

These should probably be 'native-inputs' and not 'inputs'
for cross-compilation reasons.  Try
"./pre-inst-env guix build tosdr-chromium --target=aarch64-linux-gnu"
without transparant QEMU emulation, I think it will fail if these
inputs are in 'inputs' and not 'native-inputs'.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49582; Package guix-patches. (Sun, 25 Jul 2021 17:42:02 GMT) Full text and rfc822 format available.

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

From: Justin Veilleux <justun1011 <at> gmail.com>
To: 49582 <at> debbugs.gnu.org
Subject: Re: bug#49582: [PATCH] gnu: Add tosdr-chromium.
Date: Sun, 25 Jul 2021 13:40:55 -0400
[Message part 1 (text/plain, inline)]
I've attached a patch in which I've changed bash and coreutils for 
bash-minimal and coreutils-minimal.

Also, since every package in `inputs` was actually just a build 
dependency, I've moved them all to `native-inputs`.

I've tested `./pre-inst-env guix build tosdr-chromium 
--target=aarch64-linux-gnu`, but since everything is a native input, it 
gives out the exact same derivation.


[0001-gnu-Add-tosdr-chromium.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#49582; Package guix-patches. (Sun, 25 Jul 2021 18:05:02 GMT) Full text and rfc822 format available.

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

From: Justin Veilleux <justun1011 <at> gmail.com>
To: 49582 <at> debbugs.gnu.org
Subject: Re: bug#49582: [PATCH] gnu: Add tosdr-chromium.
Date: Sun, 25 Jul 2021 14:04:22 -0400
[Message part 1 (text/plain, inline)]
oops. I forgot to fix the tabs.
[0001-gnu-Add-tosdr-chromium.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 21 days ago.

Previous Next


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