unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32.
@ 2022-06-14  9:49 Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
                   ` (10 more replies)
  0 siblings, 11 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55958; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-buffer-crc32): New variable.
---
 gnu/packages/node-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 9dcb5c3d16..be37d627cf 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -56,6 +56,38 @@ (define-public node-acorn
 architecture supporting plugins.")
     (license license:expat)))
 
+(define-public node-buffer-crc32
+  (package
+    (name "node-buffer-crc32")
+    (version "0.2.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/brianloveswords/buffer-crc32")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "09qx2mnd898190m50mc0rhyvbm7d677sxz9bn09qmqkz6fnsddgf"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (home-page "https://github.com/brianloveswords/buffer-crc32")
+    (synopsis "crc32 that works with binary data and fancy character sets,
+outputs buffer, signed or unsigned data and has tests.")
+    (description "This package provides crc32 that works with binary data and
+fancy character sets, outputs buffer, signed or unsigned data and has tests, for
+Node.")
+    (license license:expat)))
+
 (define-public node-color-name
   (package
     (name "node-color-name")
-- 
2.36.1





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

* [bug#55964] [PATCH 2/9] gnu: Add node-yazl.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 20:22   ` Marius Bakke
                     ` (2 more replies)
  2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
                   ` (9 subsequent siblings)
  10 siblings, 3 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55964; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-yazl): New variable.
---
 gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index be37d627cf..af3745f601 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1335,3 +1335,36 @@ (define-public node-serialport
 accessing serial ports.  This package is the recommended entry point for most
 projects.  It combines a high-level Node.js stream interface with a useful
 default set of parsers and bindings.")))
+
+(define-public node-yazl
+  (package
+    (name "node-yazl")
+    (version "2.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/thejoshwolfe/yazl")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "1lhwqqnvazpi4xw81ldpx0ky0h1j5rcx3br480q2bnzj21cm109n"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (inputs (list node-buffer-crc32))
+    (home-page "https://github.com/thejoshwolfe/yazl")
+    (synopsis "Yet another zip library for node")
+    (description "This package provides a zip library for Node. It follows the following principles:
+Don't block the JavaScript thread. Use and provide async APIs.
+Keep memory usage under control. Don't attempt to buffer entire files in RAM at once.
+Prefer to open input files one at a time than all at once. ")
+    (license license:expat)))
-- 
2.36.1





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

* [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 20:25   ` Marius Bakke
                     ` (2 more replies)
  2022-06-14  9:49 ` [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema Nicolas Graves via Guix-patches via
                   ` (8 subsequent siblings)
  10 siblings, 3 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55961; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-protocol-buffers-schema): New variable.
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index af3745f601..3f49955e29 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -233,6 +233,36 @@ (define-public node-oop
 while being as light-weight and simple as possible.")
       (license license:expat))))
 
+(define-public node-protocol-buffers-schema
+  (package
+    (name "node-protocol-buffers-schema")
+    (version "3.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mafintosh/protocol-buffers-schema")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0lnckxj14jzsnfxdd5kmlwrac43c214bv8i2g5rdldymlpxzrz1v"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (home-page "https://github.com/mafintosh/protocol-buffers-schema")
+    (synopsis "No nonsense protocol buffers schema parser written in Javascript")
+    (description "This package provides a protocol buffers schema parser written
+in Javascript.")
+    (license license:expat)))
+
 (define-public node-stack-trace
   ;; There have been improvements since the last release.
   (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-- 
2.36.1





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

* [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 20:54   ` Marius Bakke
  2022-07-20  9:34   ` [bug#55959] [PATCH] " Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55960] [PATCH 5/9] gnu: Add node-ieee754 Nicolas Graves via Guix-patches via
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55959; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-resolve-protobuf-schema): New variable.
---
 gnu/packages/node-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 3f49955e29..8f3288f219 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -263,6 +263,37 @@ (define-public node-protocol-buffers-schema
 in Javascript.")
     (license license:expat)))
 
+(define-public node-resolve-protobuf-schema
+  (package
+    (name "node-resolve-protobuf-schema")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mafintosh/resolve-protobuf-schema")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0zxavr0b2yz9xzp6zlsg5g09i0a6zqb24j12rdvfgph6wd4mzk40"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (inputs (list node-protocol-buffers-schema))
+    (home-page "https://github.com/mafintosh/resolve-protobuf-schema")
+    (synopsis "Read a protobuf schema from the disk, parse it and resolve all imports")
+    (description "This package allows to read a protobuf schema from the disk,
+parse it and resolve all imports.")
+    (license license:expat)))
+
 (define-public node-stack-trace
   ;; There have been improvements since the last release.
   (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-- 
2.36.1





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

* [bug#55960] [PATCH 5/9] gnu: Add node-ieee754.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (2 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 21:07   ` Marius Bakke
  2022-07-20 10:11   ` [bug#55960] [PATCH] " Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55962] [PATCH 6/9] gnu: Add node-pbf Nicolas Graves via Guix-patches via
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55960; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-ieee754): New variable.
---
 gnu/packages/node-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 8f3288f219..3d945871cd 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -458,6 +458,37 @@ (define-public node-once
 if desired.")
     (license license:isc)))
 
+(define-public node-ieee754
+  (package
+    (name "node-ieee754")
+    (version "1.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/feross/ieee754")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "19rlg59lavnwsvbblhvrqwinz2wzqlxhddqpwrc3cyqkscjgza7i"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (home-page "https://github.com/feross/ieee754")
+    (synopsis "Read/write IEEE754 floating point numbers from/to a Buffer or
+array-like object")
+    (description "This package allows to read/write IEEE754 floating point
+numbers from/to a Buffer or array-like object in Javascript.")
+    (license license:bsd-3)))
+
 (define-public node-inherits
   (package
     (name "node-inherits")
-- 
2.36.1





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

* [bug#55962] [PATCH 6/9] gnu: Add node-pbf.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (3 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55960] [PATCH 5/9] gnu: Add node-ieee754 Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 21:10   ` Marius Bakke
  2022-07-20 10:15   ` [bug#55962] [PATCH] " Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55963] [PATCH 7/9] gnu: Add node-minimist Nicolas Graves via Guix-patches via
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55962; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-pbf): New variable.
---
 gnu/packages/node-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 3d945871cd..aa838108ad 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -233,6 +233,41 @@ (define-public node-oop
 while being as light-weight and simple as possible.")
       (license license:expat))))
 
+(define-public node-pbf
+  (package
+    (name "node-pbf")
+    (version "3.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mapbox/pbf")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "1r8xs787ix79yr0vrwrizdml9h7cmxjrzhvnhkj784ac5f8nv5j7"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (inputs (list node-ieee754 node-resolve-protobuf-schema))
+    (home-page "https://github.com/mapbox/pbf")
+    (synopsis "Low-level library for decoding and encodingprotocol buffers in
+Javascript")
+    (description "This package is a low-level, fast, ultra-lightweight (3KB
+gzipped) JavaScript library for decoding and encoding protocol buffers, a
+compact binary format for structured data serialization. Works both in Node and
+the browser. Supports lazy decoding and detailed customization of the
+reading/writing code.")
+    (license license:bsd-3)))
+
 (define-public node-protocol-buffers-schema
   (package
     (name "node-protocol-buffers-schema")
-- 
2.36.1





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

* [bug#55963] [PATCH 7/9] gnu: Add node-minimist.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (4 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55962] [PATCH 6/9] gnu: Add node-pbf Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 21:14   ` Marius Bakke
  2022-07-20 10:16   ` [bug#55963] [PATCH] " Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55965] [PATCH 8/9] gnu: Add node-crx3 Nicolas Graves via Guix-patches via
                   ` (4 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55963; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-minimist): New variable.
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index aa838108ad..8ec014eee8 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -208,6 +208,36 @@ (define-public node-mersenne
 random number generator.")
     (license license:bsd-3)))
 
+(define-public node-minimist
+  (package
+    (name "node-minimist")
+    (version "1.2.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/substack/minimist")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0mxj40mygbiy530wskc8l28wxb6fv3f8vrhpwjgprymhpgbaac7d"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (home-page "https://github.com/substack/minimist")
+    (synopsis "Quickly scan for CLI flags and arguments in Javascript")
+    (description "This package allows to Quickly scan for CLI flags and
+arguments in Javascript.")
+    (license license:expat)))
+
 (define-public node-oop
   ;; No releases, last commit was February 2013.
   (let ((commit "f9d87cda0958886955c14a0a716e57021ed295dc")
-- 
2.36.1





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

* [bug#55965] [PATCH 8/9] gnu: Add node-crx3.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (5 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55963] [PATCH 7/9] gnu: Add node-minimist Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 21:17   ` Marius Bakke
  2022-07-20 10:20   ` [bug#55965] [PATCH] " Nicolas Graves via Guix-patches via
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55965; +Cc: Nicolas Graves

* gnu/packages/node-xyz.scm (node-crx3): New variable.
---
 gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 8ec014eee8..79594856f1 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -109,6 +109,46 @@ (define-public node-color-name
      "This package provides a JSON list with color names and their values.")
     (license license:expat)))
 
+(define-public node-crx3
+  (package
+    (name "node-crx3")
+    (version "1.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ahwayakchih/crx3")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1snqyw8c3s9p2clhqh1172z0rs1was36sfxkk6acgpar32c2rwzw"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (add-after 'unpack 'replace-mri-by-minimist
+           (lambda _
+             (substitute* "package.json"
+               (("\"mri\": \"\\^1.1.6\",") "\"minimist\": \"^1.2.6\","))
+             (substitute* "lib/configuration.js"
+               (("mri") "minimist"))
+             #t))
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
+                     "--offline" "--ignore-scripts" "install" "--production")
+             #t)))))
+    (inputs (list node-minimist node-pbf node-yazl))
+    (home-page "https://github.com/ahwayakchih/crx3")
+    (synopsis "Create web extension files for Chromium and all other browsers
+supporting the file format and API")
+    (description "This package creates web extension files (CRXv3) for Chromium
+versions 64.0.3242 and above and all other browsers supporting the file format
+and API.")
+    (license license:bsd-3)))
+
 (define-public node-env-variable
   (package
     (name "node-env-variable")
-- 
2.36.1





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

* [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (6 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55965] [PATCH 8/9] gnu: Add node-crx3 Nicolas Graves via Guix-patches via
@ 2022-06-14  9:49 ` Nicolas Graves via Guix-patches via
  2022-06-23 21:20   ` Marius Bakke
                     ` (3 more replies)
  2022-06-14 10:03 ` [bug#55958] Nicolas Graves via Guix-patches via
                   ` (2 subsequent siblings)
  10 siblings, 4 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14  9:49 UTC (permalink / raw)
  To: 55966; +Cc: Nicolas Graves

---
 gnu/build/chromium-extension.scm | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/gnu/build/chromium-extension.scm b/gnu/build/chromium-extension.scm
index 8ca5251957..8d52153751 100644
--- a/gnu/build/chromium-extension.scm
+++ b/gnu/build/chromium-extension.scm
@@ -19,10 +19,9 @@
 (define-module (gnu build chromium-extension)
   #:use-module (guix gexp)
   #:use-module (guix packages)
-  #:use-module (gnu packages chromium)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages node-xyz)
   #:use-module (guix build-system trivial)
   #:export (make-chromium-extension))
 
@@ -69,24 +68,14 @@ (define version (package-version package))
    (string-append name "-" version ".crx")
    (with-imported-modules '((guix build utils))
      #~(begin
-         ;; This is not great.  We pull Xorg and Chromium just to Zip and
-         ;; sign an extension.  This should be implemented with something
-         ;; lighter.  (TODO: where is the CRXv3 documentation..?)
          (use-modules (guix build utils))
-         (let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
-               (xvfb #$(file-append xorg-server "/bin/Xvfb"))
+         (let ((crx3 #$(file-append node-crx3 "/bin/crx3"))
                (packdir (string-append (getcwd) "/extension")))
            (mkdir packdir)
            (copy-recursively (ungexp package package-output) packdir
                              ;; Ensure consistent file modification times.
                              #:keep-mtime? #t)
-           (system (string-append xvfb " :1 &"))
-           (setenv "DISPLAY" ":1")
-           (sleep 2)                    ;give Xorg some time to initialize...
-           (invoke chromium
-                   "--user-data-dir=chromium-profile"
-                   (string-append "--pack-extension=" packdir)
-                   (string-append "--pack-extension-key=" #$signing-key))
+           (invoke crx3 "--keyPath" #$signing-key packdir)
            (copy-file (string-append packdir ".crx") #$output))))
    #:local-build? #t))
 
-- 
2.36.1





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

* [bug#55958]
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (7 preceding siblings ...)
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
@ 2022-06-14 10:03 ` Nicolas Graves via Guix-patches via
  2022-06-23 20:07   ` [bug#55958] Marius Bakke
  2022-06-23 20:15 ` [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Marius Bakke
  2022-07-19 21:28 ` [bug#55958] [PATCH] " Nicolas Graves via Guix-patches via
  10 siblings, 1 reply; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-06-14 10:03 UTC (permalink / raw)
  To: 55958


Hi !

This series of patches allows to produce the crx file without having to
rely on chromium and xorg.

Not fully tested, originally designed for fixing bug#55844, and works at
least for building a few extensions.

I volontarily built all node packages without development dependencies
(npm...) so that it stays simple, and replaced mri by minimist so that we
also avoid a lot of dependencies.

Cheers,

Nicolas




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

* [bug#55958]
  2022-06-14 10:03 ` [bug#55958] Nicolas Graves via Guix-patches via
@ 2022-06-23 20:07   ` Marius Bakke
  0 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 20:07 UTC (permalink / raw)
  To: Nicolas Graves, 55958

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> Hi !
>
> This series of patches allows to produce the crx file without having to
> rely on chromium and xorg.

Awesome.  :-)

> Not fully tested, originally designed for fixing bug#55844, and works at
> least for building a few extensions.

OK.  Looking forward to more Chromium extensions in Guix!

> I volontarily built all node packages without development dependencies
> (npm...) so that it stays simple, and replaced mri by minimist so that we
> also avoid a lot of dependencies.

Makes sense, well done.  I'll comment on the patches individually.

Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (8 preceding siblings ...)
  2022-06-14 10:03 ` [bug#55958] Nicolas Graves via Guix-patches via
@ 2022-06-23 20:15 ` Marius Bakke
  2022-07-19 21:28 ` [bug#55958] [PATCH] " Nicolas Graves via Guix-patches via
  10 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 20:15 UTC (permalink / raw)
  To: 55958; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-buffer-crc32): New variable.

[...]

> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)

Use #:tests? #f instead of deleting the phase.

> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")

Use (search-input-file inputs "/bin/npm") instead of (assoc-ref inputs ...).

Although in this case I think you don't need the absolute file name as
"npm" should already be on PATH, so you can just (invoke "npm" ...).


> +             #t)))))

There is no need to end phases on #t any more.

> +    (home-page "https://github.com/brianloveswords/buffer-crc32")
> +    (synopsis "crc32 that works with binary data and fancy character sets,
> +outputs buffer, signed or unsigned data and has tests.")

Try to keep synopses short, and avoid duplicating the description.
Maybe something like "CRC32 implementation in JavaScript"?

> +    (description "This package provides crc32 that works with binary data and

s/crc32/a CRC32 algorithm/

> +fancy character sets, outputs buffer, signed or unsigned data and has tests, for

I don't understand what "outputs buffer" means here, can you elaborate?

Otherwise LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55964] [PATCH 2/9] gnu: Add node-yazl.
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
@ 2022-06-23 20:22   ` Marius Bakke
  2022-06-23 22:23   ` Maxime Devos
  2022-07-20  9:16   ` [bug#55964] [PATCH] " Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 20:22 UTC (permalink / raw)
  To: 55964; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-yazl): New variable.

[...]

> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/thejoshwolfe/yazl")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "1lhwqqnvazpi4xw81ldpx0ky0h1j5rcx3br480q2bnzj21cm109n"))))

Indentation seems off here ('./pre-inst-env guix style node-yazl' can
take care of it if you don't use Emacs).

> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))

Same comments as previous patch.

> +    (inputs (list node-buffer-crc32))
> +    (home-page "https://github.com/thejoshwolfe/yazl")
> +    (synopsis "Yet another zip library for node")
> +    (description "This package provides a zip library for Node. It follows the following principles:

Keep lines < 78 characters if possible.  Also use two spaces after
punctuation.

'./pre-inst-env guix lint PACKAGE' will warn about this and save review
time.  ;-)

> +Don't block the JavaScript thread. Use and provide async APIs.
> +Keep memory usage under control. Don't attempt to buffer entire files in RAM at once.
> +Prefer to open input files one at a time than all at once. ")

Use @enumerate for "bullet lists" which this seems to be.

Otherwise LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema.
  2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
@ 2022-06-23 20:25   ` Marius Bakke
  2022-07-20  9:27   ` [bug#55961] [PATCH] " Nicolas Graves via Guix-patches via
  2022-07-20  9:31   ` Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 20:25 UTC (permalink / raw)
  To: 55961; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-protocol-buffers-schema): New variable.
> ---
>  gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index af3745f601..3f49955e29 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -233,6 +233,36 @@ (define-public node-oop
>  while being as light-weight and simple as possible.")
>        (license license:expat))))
>  
> +(define-public node-protocol-buffers-schema
> +  (package
> +    (name "node-protocol-buffers-schema")
> +    (version "3.6.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/mafintosh/protocol-buffers-schema")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "0lnckxj14jzsnfxdd5kmlwrac43c214bv8i2g5rdldymlpxzrz1v"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))

Same comments as before regarding arguments and indentation.

> +    (home-page "https://github.com/mafintosh/protocol-buffers-schema")
> +    (synopsis "No nonsense protocol buffers schema parser written in Javascript")

Avoid marketing words such as "no-nonsense".  :-)

Otherwise LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema.
  2022-06-14  9:49 ` [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema Nicolas Graves via Guix-patches via
@ 2022-06-23 20:54   ` Marius Bakke
  2022-07-20  9:34   ` [bug#55959] [PATCH] " Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 20:54 UTC (permalink / raw)
  To: 55959; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-resolve-protobuf-schema): New variable.
> ---
>  gnu/packages/node-xyz.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 3f49955e29..8f3288f219 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -263,6 +263,37 @@ (define-public node-protocol-buffers-schema
>  in Javascript.")
>      (license license:expat)))
>  
> +(define-public node-resolve-protobuf-schema
> +  (package
> +    (name "node-resolve-protobuf-schema")
> +    (version "2.1.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/mafintosh/resolve-protobuf-schema")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "0zxavr0b2yz9xzp6zlsg5g09i0a6zqb24j12rdvfgph6wd4mzk40"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))

Same comments as ... you get the drift.

> +    (inputs (list node-protocol-buffers-schema))
> +    (home-page "https://github.com/mafintosh/resolve-protobuf-schema")
> +    (synopsis "Read a protobuf schema from the disk, parse it and resolve all imports")

Maybe just "Resolve protobuf imports".

> +    (description "This package allows to read a protobuf schema from the disk,
> +parse it and resolve all imports.")

s/allows to/can/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55960] [PATCH 5/9] gnu: Add node-ieee754.
  2022-06-14  9:49 ` [bug#55960] [PATCH 5/9] gnu: Add node-ieee754 Nicolas Graves via Guix-patches via
@ 2022-06-23 21:07   ` Marius Bakke
  2022-07-20 10:11   ` [bug#55960] [PATCH] " Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 21:07 UTC (permalink / raw)
  To: 55960; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-ieee754): New variable.
> ---
>  gnu/packages/node-xyz.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 8f3288f219..3d945871cd 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -458,6 +458,37 @@ (define-public node-once
>  if desired.")
>      (license license:isc)))
>  
> +(define-public node-ieee754
> +  (package
> +    (name "node-ieee754")
> +    (version "1.2.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/feross/ieee754")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "19rlg59lavnwsvbblhvrqwinz2wzqlxhddqpwrc3cyqkscjgza7i"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))

I realize all of these were copy-pasted so I won't repeat any more.  ;-)

> +    (home-page "https://github.com/feross/ieee754")
> +    (synopsis "Read/write IEEE754 floating point numbers from/to a Buffer or
> +array-like object")
> +    (description "This package allows to read/write IEEE754 floating point
> +numbers from/to a Buffer or array-like object in Javascript.")

Can you try to either shorten the synopsis or expand on the description
to avoid duplication?

Writing good descriptions is often the most difficult part of writing a
package definition...  The upstream documentation is not very helpful in
this case.  :-/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55962] [PATCH 6/9] gnu: Add node-pbf.
  2022-06-14  9:49 ` [bug#55962] [PATCH 6/9] gnu: Add node-pbf Nicolas Graves via Guix-patches via
@ 2022-06-23 21:10   ` Marius Bakke
  2022-07-20 10:15   ` [bug#55962] [PATCH] " Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 21:10 UTC (permalink / raw)
  To: 55962; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-pbf): New variable.
> ---
>  gnu/packages/node-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 3d945871cd..aa838108ad 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -233,6 +233,41 @@ (define-public node-oop
>  while being as light-weight and simple as possible.")
>        (license license:expat))))
>  
> +(define-public node-pbf
> +  (package
> +    (name "node-pbf")
> +    (version "3.2.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/mapbox/pbf")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "1r8xs787ix79yr0vrwrizdml9h7cmxjrzhvnhkj784ac5f8nv5j7"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))
> +    (inputs (list node-ieee754 node-resolve-protobuf-schema))
> +    (home-page "https://github.com/mapbox/pbf")
> +    (synopsis "Low-level library for decoding and encodingprotocol buffers in
> +Javascript")

Maybe "Decode and encode protocol buffers in Javascript"?

> +    (description "This package is a low-level, fast, ultra-lightweight (3KB
> +gzipped) JavaScript library for decoding and encoding protocol buffers, a
> +compact binary format for structured data serialization. Works both in Node and
> +the browser. Supports lazy decoding and detailed customization of the
> +reading/writing code.")

s/ultra-// and no need to mention the size.  Remember two spaces after
punctuation (or 'guix lint').  Otherwise great.  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55963] [PATCH 7/9] gnu: Add node-minimist.
  2022-06-14  9:49 ` [bug#55963] [PATCH 7/9] gnu: Add node-minimist Nicolas Graves via Guix-patches via
@ 2022-06-23 21:14   ` Marius Bakke
  2022-07-20 10:16   ` [bug#55963] [PATCH] " Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 21:14 UTC (permalink / raw)
  To: 55963; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-minimist): New variable.
> ---
>  gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index aa838108ad..8ec014eee8 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -208,6 +208,36 @@ (define-public node-mersenne
>  random number generator.")
>      (license license:bsd-3)))
>  
> +(define-public node-minimist
> +  (package
> +    (name "node-minimist")
> +    (version "1.2.6")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/substack/minimist")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +          (base32
> +           "0mxj40mygbiy530wskc8l28wxb6fv3f8vrhpwjgprymhpgbaac7d"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))
> +    (home-page "https://github.com/substack/minimist")
> +    (synopsis "Quickly scan for CLI flags and arguments in Javascript")

Perhaps "Parse CLI arguments JavaScript"?

> +    (description "This package allows to Quickly scan for CLI flags and
> +arguments in Javascript.")

s/allows to Quickly/allows scanning/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55965] [PATCH 8/9] gnu: Add node-crx3.
  2022-06-14  9:49 ` [bug#55965] [PATCH 8/9] gnu: Add node-crx3 Nicolas Graves via Guix-patches via
@ 2022-06-23 21:17   ` Marius Bakke
  2022-07-20 10:20   ` [bug#55965] [PATCH] " Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 21:17 UTC (permalink / raw)
  To: 55965; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> * gnu/packages/node-xyz.scm (node-crx3): New variable.
> ---
>  gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 8ec014eee8..79594856f1 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -109,6 +109,46 @@ (define-public node-color-name
>       "This package provides a JSON list with color names and their values.")
>      (license license:expat)))
>  
> +(define-public node-crx3
> +  (package
> +    (name "node-crx3")
> +    (version "1.1.3")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/ahwayakchih/crx3")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> +         "1snqyw8c3s9p2clhqh1172z0rs1was36sfxkk6acgpar32c2rwzw"))))
> +    (build-system node-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'check)
> +         (add-after 'unpack 'replace-mri-by-minimist
> +           (lambda _
> +             (substitute* "package.json"
> +               (("\"mri\": \"\\^1.1.6\",") "\"minimist\": \"^1.2.6\","))

Dots should also be escaped, otherwise they match any character.
Personally I prefer to have the replacement on a second line for
readability but no strong opinion.

> +             (substitute* "lib/configuration.js"
> +               (("mri") "minimist"))
> +             #t))
> +         (replace 'configure
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (invoke (string-append (assoc-ref inputs "node") "/bin/npm")
> +                     "--offline" "--ignore-scripts" "install" "--production")
> +             #t)))))
> +    (inputs (list node-minimist node-pbf node-yazl))
> +    (home-page "https://github.com/ahwayakchih/crx3")
> +    (synopsis "Create web extension files for Chromium and all other browsers
> +supporting the file format and API")

Perhaps 'Create CRXv3 browser extensions with JavaScript'?

Also, can you add your copyright at the top of the file?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx.
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
@ 2022-06-23 21:20   ` Marius Bakke
  2022-06-23 22:28   ` Maxime Devos
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-06-23 21:20 UTC (permalink / raw)
  To: 55966; +Cc: Nicolas Graves

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

Nicolas Graves via Guix-patches via <guix-patches@gnu.org> skriver:

> ---
>  gnu/build/chromium-extension.scm | 17 +++--------------
>  1 file changed, 3 insertions(+), 14 deletions(-)

This commit lacks a message describing the changed variable.  The commit
title could also be more descriptive.  ;-)

> diff --git a/gnu/build/chromium-extension.scm b/gnu/build/chromium-extension.scm
> index 8ca5251957..8d52153751 100644
> --- a/gnu/build/chromium-extension.scm
> +++ b/gnu/build/chromium-extension.scm
> @@ -19,10 +19,9 @@
>  (define-module (gnu build chromium-extension)
>    #:use-module (guix gexp)
>    #:use-module (guix packages)
> -  #:use-module (gnu packages chromium)
>    #:use-module (gnu packages gnupg)
>    #:use-module (gnu packages tls)
> -  #:use-module (gnu packages xorg)
> +  #:use-module (gnu packages node-xyz)
>    #:use-module (guix build-system trivial)
>    #:export (make-chromium-extension))
>  
> @@ -69,24 +68,14 @@ (define version (package-version package))
>     (string-append name "-" version ".crx")
>     (with-imported-modules '((guix build utils))
>       #~(begin
> -         ;; This is not great.  We pull Xorg and Chromium just to Zip and
> -         ;; sign an extension.  This should be implemented with something
> -         ;; lighter.  (TODO: where is the CRXv3 documentation..?)

Wohoo.  :-)

>           (use-modules (guix build utils))
> -         (let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
> -               (xvfb #$(file-append xorg-server "/bin/Xvfb"))
> +         (let ((crx3 #$(file-append node-crx3 "/bin/crx3"))
>                 (packdir (string-append (getcwd) "/extension")))
>             (mkdir packdir)
>             (copy-recursively (ungexp package package-output) packdir
>                               ;; Ensure consistent file modification times.
>                               #:keep-mtime? #t)
> -           (system (string-append xvfb " :1 &"))
> -           (setenv "DISPLAY" ":1")
> -           (sleep 2)                    ;give Xorg some time to initialize...
> -           (invoke chromium
> -                   "--user-data-dir=chromium-profile"
> -                   (string-append "--pack-extension=" packdir)
> -                   (string-append "--pack-extension-key=" #$signing-key))
> +           (invoke crx3 "--keyPath" #$signing-key packdir)

LGTM!  Feel free to add your copyright here too.

Can you send an updated series?

Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* [bug#55964] [PATCH 2/9] gnu: Add node-yazl.
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
  2022-06-23 20:22   ` Marius Bakke
@ 2022-06-23 22:23   ` Maxime Devos
  2022-07-20  9:16   ` [bug#55964] [PATCH] " Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Maxime Devos @ 2022-06-23 22:23 UTC (permalink / raw)
  To: Nicolas Graves, 55964

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

Nicolas Graves via Guix-patches via schreef op di 14-06-2022 om 11:49
[+0200]:
> +         (delete 'check)

You can use #:tests? #false for that.

> +             #t)))))

No need for trailing #t anymore (though harmless)!

Greetings,
Maxime.

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

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

* [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx.
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
  2022-06-23 21:20   ` Marius Bakke
@ 2022-06-23 22:28   ` Maxime Devos
  2022-07-20 10:39   ` [bug#55966] [PATCH] gnu: modifying make-chromium-extension to rely on node-crx3 Nicolas Graves via Guix-patches via
  2022-07-20 10:46   ` [bug#55966] Updated series Nicolas Graves via Guix-patches via
  3 siblings, 0 replies; 34+ messages in thread
From: Maxime Devos @ 2022-06-23 22:28 UTC (permalink / raw)
  To: Nicolas Graves, 55966

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

Nicolas Graves via Guix-patches via schreef op di 14-06-2022 om 11:49
[+0200]:
> -         (let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
> -               (xvfb #$(file-append xorg-server "/bin/Xvfb"))
> +         (let ((crx3 #$(file-append node-crx3 "/bin/crx3"))
>                 (packdir (string-append (getcwd) "/extension")))

You're invoking crx3 below, so it shouldn't be cross-compiled even if
the extension is cross-compiled, hence the #$(file-append node-crx3
...) should probably be #+(file-append node-crx ...) instead.

(Also was an issue in the old code that used chromium and xorg-server
..., and probably the chromium build system doesn't implement cross-
compilation yet ...)

Greetings,
Maxime.

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

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

* [bug#55958] [PATCH] gnu: Add node-buffer-crc32.
  2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
                   ` (9 preceding siblings ...)
  2022-06-23 20:15 ` [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Marius Bakke
@ 2022-07-19 21:28 ` Nicolas Graves via Guix-patches via
  10 siblings, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-19 21:28 UTC (permalink / raw)
  To: 55958; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-buffer-crc32): New variable.
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 9dcb5c3d16..d6035e2c23 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -56,6 +56,36 @@ (define-public node-acorn
 architecture supporting plugins.")
     (license license:expat)))
 
+(define-public node-buffer-crc32
+  (package
+    (name "node-buffer-crc32")
+    (version "0.2.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/brianloveswords/buffer-crc32")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "09qx2mnd898190m50mc0rhyvbm7d677sxz9bn09qmqkz6fnsddgf"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (home-page "https://github.com/brianloveswords/buffer-crc32")
+    (synopsis "CRC32 implementation in Javascript")
+    (description "This package provides a CRC32 algorithm that works with
+binary data and fancy character sets, signed or unsigned data and has tests,
+for Node.")
+    (license license:expat)))
+
 (define-public node-color-name
   (package
     (name "node-color-name")
-- 
2.37.0





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

* [bug#55964] [PATCH] gnu: Add node-yazl.
  2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
  2022-06-23 20:22   ` Marius Bakke
  2022-06-23 22:23   ` Maxime Devos
@ 2022-07-20  9:16   ` Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20  9:16 UTC (permalink / raw)
  To: 55964; +Cc: ngraves

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2189 bytes --]

* gnu/packages/node-xyz.scm (node-yazl): New variable.
---
 gnu/packages/node-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d6035e2c23..dec7d9ef19 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
 ;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
+;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1333,3 +1334,39 @@ (define-public node-serialport
 accessing serial ports.  This package is the recommended entry point for most
 projects.  It combines a high-level Node.js stream interface with a useful
 default set of parsers and bindings.")))
+
+(define-public node-yazl
+  (package
+    (name "node-yazl")
+    (version "2.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/thejoshwolfe/yazl")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1lhwqqnvazpi4xw81ldpx0ky0h1j5rcx3br480q2bnzj21cm109n"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (inputs (list node-buffer-crc32))
+    (home-page "https://github.com/thejoshwolfe/yazl")
+    (synopsis "Yet another zip library for node")
+    (description "This package provides a zip library for Node.  It follows
+the following principles:
+@enumerate
+@item Don't block the JavaScript thread.  Use and provide async APIs.
+@item Keep memory usage under control.  Don't attempt to buffer entire
+files in RAM at once.
+@item Prefer to open input files one at a time than all at once.
+@end enumerate")
+    (license license:expat)))
-- 
2.37.0





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

* [bug#55961] [PATCH] gnu: Add node-protocol-buffers-schema.
  2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
  2022-06-23 20:25   ` Marius Bakke
@ 2022-07-20  9:27   ` Nicolas Graves via Guix-patches via
  2022-07-20  9:31   ` Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20  9:27 UTC (permalink / raw)
  To: 55961; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-protocol-buffers-schema): New variable.
---
 gnu/packages/node-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index dec7d9ef19..e02a561967 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -232,6 +232,35 @@ (define-public node-oop
 while being as light-weight and simple as possible.")
       (license license:expat))))
 
+(define-public node-protocol-buffers-schema
+  (package
+    (name "node-protocol-buffers-schema")
+    (version "3.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mafintosh/protocol-buffers-schema")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0lnckxj14jzsnfxdd5kmlwrac43c214bv8i2g5rdldymlpxzrz1v"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (home-page "https://github.com/mafintosh/protocol-buffers-schema")
+    (synopsis "Protocol buffers schema parser written in Javascript")
+    (description "This package provides a protocol buffers schema parser written
+in Javascript.")
+    (license license:expat)))
+
 (define-public node-stack-trace
   ;; There have been improvements since the last release.
   (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-- 
2.37.0





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

* [bug#55961] [PATCH] gnu: Add node-protocol-buffers-schema.
  2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
  2022-06-23 20:25   ` Marius Bakke
  2022-07-20  9:27   ` [bug#55961] [PATCH] " Nicolas Graves via Guix-patches via
@ 2022-07-20  9:31   ` Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20  9:31 UTC (permalink / raw)
  To: 55961; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-protocol-buffers-schema): New variable.
---
 gnu/packages/node-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index dec7d9ef19..4e28224cdf 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -232,6 +232,35 @@ (define-public node-oop
 while being as light-weight and simple as possible.")
       (license license:expat))))
 
+(define-public node-protocol-buffers-schema
+  (package
+    (name "node-protocol-buffers-schema")
+    (version "3.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mafintosh/protocol-buffers-schema")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0lnckxj14jzsnfxdd5kmlwrac43c214bv8i2g5rdldymlpxzrz1v"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (home-page "https://github.com/mafintosh/protocol-buffers-schema")
+    (synopsis "Protocol buffers schema parser written in Javascript")
+    (description "This package provides a protocol buffers schema parser
+written in Javascript.")
+    (license license:expat)))
+
 (define-public node-stack-trace
   ;; There have been improvements since the last release.
   (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-- 
2.37.0





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

* [bug#55959] [PATCH] gnu: Add node-resolve-protobuf-schema.
  2022-06-14  9:49 ` [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema Nicolas Graves via Guix-patches via
  2022-06-23 20:54   ` Marius Bakke
@ 2022-07-20  9:34   ` Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20  9:34 UTC (permalink / raw)
  To: 55959; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-resolve-protobuf-schema): New variable.
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 4e28224cdf..8d85ebaa48 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -261,6 +261,36 @@ (define-public node-protocol-buffers-schema
 written in Javascript.")
     (license license:expat)))
 
+(define-public node-resolve-protobuf-schema
+  (package
+    (name "node-resolve-protobuf-schema")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mafintosh/resolve-protobuf-schema")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0zxavr0b2yz9xzp6zlsg5g09i0a6zqb24j12rdvfgph6wd4mzk40"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (inputs (list node-protocol-buffers-schema))
+    (home-page "https://github.com/mafintosh/resolve-protobuf-schema")
+    (synopsis "Resolve protobuf imports")
+    (description "This package can read a protobuf schema from the disk, parse
+it and resolve all imports.")
+    (license license:expat)))
+
 (define-public node-stack-trace
   ;; There have been improvements since the last release.
   (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-- 
2.37.0





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

* [bug#55960] [PATCH] gnu: Add node-ieee754.
  2022-06-14  9:49 ` [bug#55960] [PATCH 5/9] gnu: Add node-ieee754 Nicolas Graves via Guix-patches via
  2022-06-23 21:07   ` Marius Bakke
@ 2022-07-20 10:11   ` Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:11 UTC (permalink / raw)
  To: 55960; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-ieee754): New variable.
---
 gnu/packages/node-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 8d85ebaa48..20325ebbc6 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -455,6 +455,35 @@ (define-public node-once
 if desired.")
     (license license:isc)))
 
+(define-public node-ieee754
+  (package
+    (name "node-ieee754")
+    (version "1.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/feross/ieee754")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "19rlg59lavnwsvbblhvrqwinz2wzqlxhddqpwrc3cyqkscjgza7i"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (home-page "https://github.com/feross/ieee754")
+    (synopsis "Read/write IEEE754 floating point numbers in Javascript")
+    (description "This package can read and write IEEE754 floating point
+numbers from/to a Buffer or array-like object in Javascript.")
+    (license license:bsd-3)))
+
 (define-public node-inherits
   (package
     (name "node-inherits")
-- 
2.37.0





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

* [bug#55962] [PATCH] gnu: Add node-pbf.
  2022-06-14  9:49 ` [bug#55962] [PATCH 6/9] gnu: Add node-pbf Nicolas Graves via Guix-patches via
  2022-06-23 21:10   ` Marius Bakke
@ 2022-07-20 10:15   ` Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:15 UTC (permalink / raw)
  To: 55962; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-pbf): New variable.
---
 gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 20325ebbc6..f124e2ebfb 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -232,6 +232,39 @@ (define-public node-oop
 while being as light-weight and simple as possible.")
       (license license:expat))))
 
+(define-public node-pbf
+  (package
+    (name "node-pbf")
+    (version "3.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mapbox/pbf")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "1r8xs787ix79yr0vrwrizdml9h7cmxjrzhvnhkj784ac5f8nv5j7"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (inputs (list node-ieee754 node-resolve-protobuf-schema))
+    (home-page "https://github.com/mapbox/pbf")
+    (synopsis "Decode and encode protocol buffers in Javascript")
+    (description "This package is a low-level, fast and lightweight JavaScript
+library for decoding and encoding protocol buffers, a compact binary format
+for structured data serialization.  Works both in Node and the browser.
+Supports lazy decoding and detailed customization of the reading/writing
+code.")
+    (license license:bsd-3)))
+
 (define-public node-protocol-buffers-schema
   (package
     (name "node-protocol-buffers-schema")
-- 
2.37.0





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

* [bug#55963] [PATCH] gnu: Add node-minimist.
  2022-06-14  9:49 ` [bug#55963] [PATCH 7/9] gnu: Add node-minimist Nicolas Graves via Guix-patches via
  2022-06-23 21:14   ` Marius Bakke
@ 2022-07-20 10:16   ` Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:16 UTC (permalink / raw)
  To: 55963; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-minimist): New variable.
---
 gnu/packages/node-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index f124e2ebfb..ff3bd9084f 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -207,6 +207,35 @@ (define-public node-mersenne
 random number generator.")
     (license license:bsd-3)))
 
+(define-public node-minimist
+  (package
+    (name "node-minimist")
+    (version "1.2.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/substack/minimist")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+          (base32
+           "0mxj40mygbiy530wskc8l28wxb6fv3f8vrhpwjgprymhpgbaac7d"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (home-page "https://github.com/substack/minimist")
+    (synopsis "Parse CLI arguments in Javascript")
+    (description "This package can scan for CLI flags and arguments in
+Javascript.")
+    (license license:expat)))
+
 (define-public node-oop
   ;; No releases, last commit was February 2013.
   (let ((commit "f9d87cda0958886955c14a0a716e57021ed295dc")
-- 
2.37.0





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

* [bug#55965] [PATCH] gnu: Add node-crx3.
  2022-06-14  9:49 ` [bug#55965] [PATCH 8/9] gnu: Add node-crx3 Nicolas Graves via Guix-patches via
  2022-06-23 21:17   ` Marius Bakke
@ 2022-07-20 10:20   ` Nicolas Graves via Guix-patches via
  1 sibling, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:20 UTC (permalink / raw)
  To: 55965; +Cc: ngraves

* gnu/packages/node-xyz.scm (node-crx3): New variable.
---
 gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index ff3bd9084f..7c506afe41 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -108,6 +108,45 @@ (define-public node-color-name
      "This package provides a JSON list with color names and their values.")
     (license license:expat)))
 
+(define-public node-crx3
+  (package
+    (name "node-crx3")
+    (version "1.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ahwayakchih/crx3")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1snqyw8c3s9p2clhqh1172z0rs1was36sfxkk6acgpar32c2rwzw"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'replace-mri-by-minimist
+           (lambda _
+             (substitute* "package.json"
+               (("\"mri\": \"\\^1\\.1\\.6\",")
+                "\"minimist\": \"^1.2.6\","))
+             (substitute* "lib/configuration.js"
+               (("mri")
+                "minimist"))))
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "npm" "--offline"
+                     "--ignore-scripts" "install" "--production"))))))
+    (inputs (list node-minimist node-pbf node-yazl))
+    (home-page "https://github.com/ahwayakchih/crx3")
+    (synopsis "Create CRXv3 browser extensions with Javascript")
+    (description "This package creates web extension files (CRXv3) for Chromium
+versions 64.0.3242 and above and all other browsers supporting the file format
+and API.")
+    (license license:bsd-3)))
+
 (define-public node-env-variable
   (package
     (name "node-env-variable")
-- 
2.37.0





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

* [bug#55966] [PATCH] gnu: modifying make-chromium-extension to rely on node-crx3.
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
  2022-06-23 21:20   ` Marius Bakke
  2022-06-23 22:28   ` Maxime Devos
@ 2022-07-20 10:39   ` Nicolas Graves via Guix-patches via
  2022-07-20 10:46   ` [bug#55966] Updated series Nicolas Graves via Guix-patches via
  3 siblings, 0 replies; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:39 UTC (permalink / raw)
  To: 55966; +Cc: ngraves

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2530 bytes --]

* gnu/build/chromium-extension.scm (make-crx): Lift Xorg and Chromium
dependencies, rely on node-crx3 instead.
---
 gnu/build/chromium-extension.scm | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/gnu/build/chromium-extension.scm b/gnu/build/chromium-extension.scm
index 8ca5251957..28449a1e1d 100644
--- a/gnu/build/chromium-extension.scm
+++ b/gnu/build/chromium-extension.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,10 +20,9 @@
 (define-module (gnu build chromium-extension)
   #:use-module (guix gexp)
   #:use-module (guix packages)
-  #:use-module (gnu packages chromium)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages node-xyz)
   #:use-module (guix build-system trivial)
   #:export (make-chromium-extension))
 
@@ -69,24 +69,14 @@ (define version (package-version package))
    (string-append name "-" version ".crx")
    (with-imported-modules '((guix build utils))
      #~(begin
-         ;; This is not great.  We pull Xorg and Chromium just to Zip and
-         ;; sign an extension.  This should be implemented with something
-         ;; lighter.  (TODO: where is the CRXv3 documentation..?)
          (use-modules (guix build utils))
-         (let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
-               (xvfb #$(file-append xorg-server "/bin/Xvfb"))
+         (let ((crx3 #+(file-append node-crx3 "/bin/crx3"))
                (packdir (string-append (getcwd) "/extension")))
            (mkdir packdir)
            (copy-recursively (ungexp package package-output) packdir
                              ;; Ensure consistent file modification times.
                              #:keep-mtime? #t)
-           (system (string-append xvfb " :1 &"))
-           (setenv "DISPLAY" ":1")
-           (sleep 2)                    ;give Xorg some time to initialize...
-           (invoke chromium
-                   "--user-data-dir=chromium-profile"
-                   (string-append "--pack-extension=" packdir)
-                   (string-append "--pack-extension-key=" #$signing-key))
+           (invoke crx3 "--keyPath" #$signing-key packdir)
            (copy-file (string-append packdir ".crx") #$output))))
    #:local-build? #t))
 
-- 
2.37.0





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

* [bug#55966] Updated series
  2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
                     ` (2 preceding siblings ...)
  2022-07-20 10:39   ` [bug#55966] [PATCH] gnu: modifying make-chromium-extension to rely on node-crx3 Nicolas Graves via Guix-patches via
@ 2022-07-20 10:46   ` Nicolas Graves via Guix-patches via
  2022-07-20 15:16     ` bug#55966: " Marius Bakke
  3 siblings, 1 reply; 34+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-07-20 10:46 UTC (permalink / raw)
  To: 55966; +Cc: ngraves, marius


Hi Marius,

Sorry for the time it took me, here's the updated series.

Everything has been checked with guix lint. I use emacs, but couldn't get guix
style to work the way you counselled, hope it's ok.

Also thanks for your advice! 

-- 
Best regards,
Nicolas Graves




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

* bug#55966: Updated series
  2022-07-20 10:46   ` [bug#55966] Updated series Nicolas Graves via Guix-patches via
@ 2022-07-20 15:16     ` Marius Bakke
  0 siblings, 0 replies; 34+ messages in thread
From: Marius Bakke @ 2022-07-20 15:16 UTC (permalink / raw)
  To: Nicolas Graves, 55966-done; +Cc: ngraves

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

Nicolas Graves <ngraves@ngraves.fr> skriver:

> Hi Marius,
>
> Sorry for the time it took me, here's the updated series.

No worries, thanks a lot for this work.

> Everything has been checked with guix lint. I use emacs, but couldn't get guix
> style to work the way you counselled, hope it's ok.

What was the issue?  :-)

I ran 'guix style' for each since I had to edit the commits anyway to
get the author right (for some reason it showed up as "Nicolas Graves
via Guix-patches <guix-patches@gnu.org>" -- NYF!).

> Also thanks for your advice! 

:-)

Some more advice for future pull requests, please first send a message
to 'guix-patches@gnu.org' to get a bug ID assigned (can be anything,
although often a 'git format-patch --cover-letter').  Then send the
patch series to NNNNN@debbugs.gnu.org, otherwise the patches will
be scattered across different issues and difficult to track.

Also, use "-n" with send-email/format-patch so that the ordering is
preserved.  It was lacking in the second series, but I used the
information from the first round to get it right.

Anyway, great work, pushed as c8f33b613e..cda3de3b7d!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

end of thread, other threads:[~2022-07-20 15:18 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14  9:49 [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55964] [PATCH 2/9] gnu: Add node-yazl Nicolas Graves via Guix-patches via
2022-06-23 20:22   ` Marius Bakke
2022-06-23 22:23   ` Maxime Devos
2022-07-20  9:16   ` [bug#55964] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55961] [PATCH 3/9] gnu: Add node-protocol-buffers-schema Nicolas Graves via Guix-patches via
2022-06-23 20:25   ` Marius Bakke
2022-07-20  9:27   ` [bug#55961] [PATCH] " Nicolas Graves via Guix-patches via
2022-07-20  9:31   ` Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55959] [PATCH 4/9] gnu: Add node-resolve-protobuf-schema Nicolas Graves via Guix-patches via
2022-06-23 20:54   ` Marius Bakke
2022-07-20  9:34   ` [bug#55959] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55960] [PATCH 5/9] gnu: Add node-ieee754 Nicolas Graves via Guix-patches via
2022-06-23 21:07   ` Marius Bakke
2022-07-20 10:11   ` [bug#55960] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55962] [PATCH 6/9] gnu: Add node-pbf Nicolas Graves via Guix-patches via
2022-06-23 21:10   ` Marius Bakke
2022-07-20 10:15   ` [bug#55962] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55963] [PATCH 7/9] gnu: Add node-minimist Nicolas Graves via Guix-patches via
2022-06-23 21:14   ` Marius Bakke
2022-07-20 10:16   ` [bug#55963] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55965] [PATCH 8/9] gnu: Add node-crx3 Nicolas Graves via Guix-patches via
2022-06-23 21:17   ` Marius Bakke
2022-07-20 10:20   ` [bug#55965] [PATCH] " Nicolas Graves via Guix-patches via
2022-06-14  9:49 ` [bug#55966] [PATCH 9/9] gnu: chromium extensions lighter make-crx Nicolas Graves via Guix-patches via
2022-06-23 21:20   ` Marius Bakke
2022-06-23 22:28   ` Maxime Devos
2022-07-20 10:39   ` [bug#55966] [PATCH] gnu: modifying make-chromium-extension to rely on node-crx3 Nicolas Graves via Guix-patches via
2022-07-20 10:46   ` [bug#55966] Updated series Nicolas Graves via Guix-patches via
2022-07-20 15:16     ` bug#55966: " Marius Bakke
2022-06-14 10:03 ` [bug#55958] Nicolas Graves via Guix-patches via
2022-06-23 20:07   ` [bug#55958] Marius Bakke
2022-06-23 20:15 ` [bug#55958] [PATCH 1/9] gnu: Add node-buffer-crc32 Marius Bakke
2022-07-19 21:28 ` [bug#55958] [PATCH] " Nicolas Graves via Guix-patches via

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