unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49582] [PATCH] gnu: Add tosdr-chromium.
       [not found] <CAJppLC8TJTzf157uLQc5C3wOJvq6XRxRG_TDPdppqOGw6krkpw@mail.gmail.com>
@ 2021-07-25 15:40 ` Maxime Devos
  2021-07-25 17:40   ` Justin Veilleux
  2021-07-25 18:04   ` Justin Veilleux
  0 siblings, 2 replies; 3+ messages in thread
From: Maxime Devos @ 2021-07-25 15:40 UTC (permalink / raw)
  To: Justin Veilleux, 49582

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#49582] [PATCH] gnu: Add tosdr-chromium.
  2021-07-25 15:40 ` [bug#49582] [PATCH] gnu: Add tosdr-chromium Maxime Devos
@ 2021-07-25 17:40   ` Justin Veilleux
  2021-07-25 18:04   ` Justin Veilleux
  1 sibling, 0 replies; 3+ messages in thread
From: Justin Veilleux @ 2021-07-25 17:40 UTC (permalink / raw)
  To: 49582

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

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.



[-- Attachment #2: 0001-gnu-Add-tosdr-chromium.patch --]
[-- Type: text/x-patch, Size: 2966 bytes --]

From ff40ed3410aaa8bebb310e8803fe36bc4821ca77 Mon Sep 17 00:00:00 2001
From: terramorpha <terramorpha@cock.li>
Date: Sun, 25 Jul 2021 13:04:49 -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..017b831d8a 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@gnu.org>
+;;; Copyright © 2021 Justin Veilleux <terramorpha@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)))
+    (native-inputs
+     `(("bash" ,bash-minimal)
+       ("coreutils" ,coreutils-minimal)
+       ("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 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))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#49582] [PATCH] gnu: Add tosdr-chromium.
  2021-07-25 15:40 ` [bug#49582] [PATCH] gnu: Add tosdr-chromium Maxime Devos
  2021-07-25 17:40   ` Justin Veilleux
@ 2021-07-25 18:04   ` Justin Veilleux
  1 sibling, 0 replies; 3+ messages in thread
From: Justin Veilleux @ 2021-07-25 18:04 UTC (permalink / raw)
  To: 49582

[-- Attachment #1: Type: text/plain, Size: 32 bytes --]

oops. I forgot to fix the tabs.

[-- Attachment #2: 0001-gnu-Add-tosdr-chromium.patch --]
[-- Type: text/x-patch, Size: 3036 bytes --]

From bc5f008f967d918013255a905ef2e8bfd10cb28a Mon Sep 17 00:00:00 2001
From: terramorpha <terramorpha@cock.li>
Date: Sun, 25 Jul 2021 13:04:49 -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..b9fb464b7a 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@gnu.org>
+;;; Copyright © 2021 Justin Veilleux <terramorpha@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)))
+    (native-inputs
+     `(("bash" ,bash-minimal)
+       ("coreutils" ,coreutils-minimal)
+       ("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 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))
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-25 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAJppLC8TJTzf157uLQc5C3wOJvq6XRxRG_TDPdppqOGw6krkpw@mail.gmail.com>
2021-07-25 15:40 ` [bug#49582] [PATCH] gnu: Add tosdr-chromium Maxime Devos
2021-07-25 17:40   ` Justin Veilleux
2021-07-25 18:04   ` Justin Veilleux

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).