guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20/23: gnu: node-serialport-*: Move packages in alphabetical order.


From: guix-commits
Subject: 20/23: gnu: node-serialport-*: Move packages in alphabetical order.
Date: Sun, 18 Feb 2024 07:56:22 -0500 (EST)

sharlatan pushed a commit to branch master
in repository guix.

commit 345a54ff4c22f2f640f46b0e46b0fbdd74b1fdf4
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Sun Feb 4 13:40:30 2024 +0100

    gnu: node-serialport-*: Move packages in alphabetical order.
    
    * gnu/packages/node-xyz.scm (node-serialport-*): Move packages in 
alphabetical order.
    
    Change-Id: I3245d4dbb788061eb3264e73fc9d1fae4d4aa77b
    Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
---
 gnu/packages/node-xyz.scm | 734 +++++++++++++++++++++++-----------------------
 1 file changed, 367 insertions(+), 367 deletions(-)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index e6858db1f4..d68f730b77 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1126,117 +1126,117 @@ both @file{stderr} and to a timestamped file.")
 @uref{https://semver.org/, SemVer.org} specification.")
     (license license:isc)))
 
-(define-public node-sqlite3
+(define-public node-serialport-binding-abstract
   (package
-    (name "node-sqlite3")
-    (version "5.0.2")
+    (name "node-serialport-binding-abstract")
+    (version "9.2.3")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/mapbox/node-sqlite3";)
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
+             (url "https://github.com/serialport/node-serialport";)
+             (commit "v9.2.7")))
+       (file-name (git-file-name "serialport-monorepo" version))
        (sha256
-        (base32 "0sbbzzli282nxyfha10zx0k5m8hdp0sf3ipl59khjb7wm449j86h"))
-       (snippet
-        (with-imported-modules '((guix build utils))
-          #~(begin
-              (use-modules (guix build utils))
-              ;; unbundle sqlite
-              (for-each delete-file-recursively
-                        (find-files "deps"
-                                    (lambda (pth stat)
-                                      (gzip-file? pth)))))))))
+        (base32 "0x7zm59a5ff5yygjyw15xs3r5m3rb8av1yfrh4snn44mrwq87yg8"))))
     (inputs
-     (list node-addon-api python sqlite))
+     (list node-debug))
     (build-system node-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda args
+             (chdir "packages/binding-abstract"))))
+       #:tests? #f))
+    (home-page "https://serialport.io";)
+    (synopsis "Abstract base class for Node SerialPort bindings")
+    (description "Node SerialPort is a modular suite of Node.js packages for
+accessing serial ports.  The Guix package @code{node-serialport} provides the
+recommended high-level interface.
+
+This package provides the @code{AbstractBinding} class, the base for all Node
+SerialPort bindings.  You wouldn't use this class directly, but instead extend
+it to make a new binding for a different platform or underling technology.")
+    (license license:expat)))
+
+(define-public node-serialport-parser-delimiter
+  (package
+    (inherit node-serialport-binding-abstract)
+    (name "node-serialport-parser-delimiter")
+    (version "9.2.4")
+    (inputs `())
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda args
+             (chdir "packages/parser-delimiter"))))
+       #:tests? #f))
+    (synopsis "Node SerialPort parser to split data on a delimiter")
+    (description "Node SerialPort is a modular suite of Node.js packages for
+accessing serial ports.  The Guix package @code{node-serialport} provides the
+recommended high-level interface.
+
+Parsers are used to take raw binary data and transform them into usable
+messages.  This package provides @code{Delimiter}, a parser that emits data
+each time a specified byte sequence is received.")))
+
+(define-public node-serialport-parser-readline
+  (package
+    (inherit node-serialport-binding-abstract)
+    (name "node-serialport-parser-readline")
+    (version "9.2.4")
+    (inputs
+     (list node-serialport-parser-delimiter))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda args
+             (chdir "packages/parser-readline"))))
+       #:tests? #f))
+    (synopsis "Node SerialPort parser to split data on newlines")
+    (description "Node SerialPort is a modular suite of Node.js packages for
+accessing serial ports.  The Guix package @code{node-serialport} provides the
+recommended high-level interface.
+
+Parsers are used to take raw binary data and transform them into usable
+messages.  This package provides @code{Readline}, a parser that emits data
+after a (configurable) newline delimiter is received.")))
+
+(define-public node-serialport-bindings
+  (package
+    (inherit node-serialport-binding-abstract)
+    (name "node-serialport-bindings")
+    (version "9.2.7")
+    (native-inputs
+     (list python))
+    (inputs
+     (list node-nan node-bindings node-serialport-binding-abstract
+           node-serialport-parser-readline node-debug))
     (arguments
      `(#:modules
        ((guix build node-build-system)
         (srfi srfi-1)
         (ice-9 match)
         (guix build utils))
-       #:tests? #f ; FIXME: tests depend on node-mocha
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda args
+             (chdir "packages/bindings")))
          (add-after 'patch-dependencies 'delete-dependencies
            (lambda args
-             (delete-dependencies
-              `(;; Normally, this is "built" using @mapbox/node-pre-gyp,
-                ;; which publishes or downloads pre-built binaries or
-                ;; falls back to building from source.  Here, we patch out
-                ;; all of that and just build directly.  It might be
-                ;; better to patch a version of @mapbox/node-pre-gyp that
-                ;; always builds from source, as Debian does, but there
-                ;; are a number of dependencies that need to be packaged
-                ;; or removed.
-                "@mapbox/node-pre-gyp"
-                "node-pre-gyp" ;; deprecated name still used in some places
-                "aws-sdk"
-                "@mapbox/cloudfriend"
-                ;; Confusingly, this is only a dependency because of
-                ;; @mapbox/node-pre-gyp: with that removed,
-                ;; npm will use its own copy:
-                "node-gyp"
-                ;; These we'd like, we just don't have them yet:
-                "eslint"
-                "mocha"))))
-         (add-before 'configure 'npm-config-sqlite
-           ;; We need this step even if we do replace @mapbox/node-pre-gyp
-           ;; because the package expects to build its bundled sqlite
-           (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "npm_config_sqlite" (assoc-ref inputs "sqlite"))))
-         (add-after 'install 'patch-binding-path
-           ;; We replace a file that dynamic searches for the addon using
-           ;; node-pre-gyp (which we don't have) with a version that
-           ;; simply uses the path to the addon we built directly.
-           ;; The exact path is supposed to depend on things like the
-           ;; architecture and napi_build_version, so, to avoid having
-           ;; hard-code the details accurately, we do this after the addon
-           ;; has been built so we can just find where it ended up.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (with-directory-excursion
-                 (search-input-directory outputs
-                                         "lib/node_modules/sqlite3/lib")
-               (match (find-files "binding" "\\.node$")
-                 ((rel-path)
-                  (with-atomic-file-replacement "sqlite3-binding.js"
-                    (lambda (in out)
-                      (format out "var binding = require('./~a');\n" rel-path)
-                      (display "module.exports = exports = binding;\n"
-                               out))))))))
-         (add-after 'patch-dependencies 'avoid-node-pre-gyp
+             (delete-dependencies `("prebuild-install"
+                                    ;; devDependencies
+                                    "@serialport/binding-mock"
+                                    "node-abi"))))
+         (add-after 'chdir 'avoid-prebuild-install
            (lambda args
-             ;; We need to patch .npmignore before the 'repack phase
-             ;; so that the built addon is installed with in the package.
-             ;; (Upstream assumes node-pre-gyp will download a pre-built
-             ;; version when this package is installed.)
-             (substitute* ".npmignore"
-               (("lib/binding")
-                "#lib/binding # <- patched for Guix"))
              (with-atomic-json-file-replacement "package.json"
                (match-lambda
                  (('@ . pkg-meta-alist)
-                  (match (assoc-ref pkg-meta-alist "binary")
-                    (('@ . binary-alist)
-                     ;; When it builds from source, node-pre-gyp supplies
-                     ;; module_name and module_path based on the entries under
-                     ;; "binary" from "package.json", so this package's
-                     ;; "binding.gyp" doesn't define them. Thus, we also need
-                     ;; to supply them. The GYP_DEFINES environment variable
-                     ;; turns out to be the easiest way to make sure they are
-                     ;; propagated from npm to node-gyp to gyp.
-                     (setenv "GYP_DEFINES"
-                             (string-append
-                              "module_name="
-                              (assoc-ref binary-alist "module_name")
-                              " "
-                              "module_path="
-                              (assoc-ref binary-alist "module_path")))))
-                  ;; We need to remove the install script from "package.json",
-                  ;; as it would try to use node-pre-gyp and would block the
-                  ;; automatic building performed by `npm install`.
                   (cons '@ (map (match-lambda
                                   (("scripts" @ . scripts-alist)
                                    `("scripts" @ ,@(filter (match-lambda
@@ -1245,288 +1245,23 @@ both @file{stderr} and to a timestamped file.")
                                                              (_
                                                               #t))
                                                            scripts-alist)))
+                                  (("gypfile" . _)
+                                   '("gypfile" . #f))
                                   (other
                                    other))
-                                pkg-meta-alist))))))))))
-    (home-page "https://github.com/mapbox/node-sqlite3";)
-    (synopsis "Node.js bindings for SQLite3")
-    (description
-     "@code{node-sqlite3} provides a set of a Node.js bindings for interacting
-with SQLite3 databases.")
-     (license license:bsd-3)))
-
-(define-public node-stack-trace
-  ;; There have been improvements since the last release.
-  (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
-        (revision "1"))
-    (package
-      (name "node-stack-trace")
-      (version (git-version "0.0.10" revision commit))
-      (source
-        (origin
-          (method git-fetch)
-          (uri (git-reference
-                 (url "https://github.com/felixge/node-stack-trace";)
-                 (commit commit)))
-          (file-name (git-file-name name version))
-          (sha256
-           (base32
-            "1pk19wcpy8i95z5jr77fybd57qj7xmzmniap4dy47vjlmpkqia4i"))))
-      (build-system node-build-system)
-      (arguments
-       '(#:phases
-         (modify-phases %standard-phases
-         (add-before 'check 'skip-intentionally-failing-test
-           (lambda _
-             (substitute* "test/run.js"
-               (("far.include") "far.exclude(/test-parse.js/)\nfar.include"))
-             #t)))))
-      (native-inputs
-       (list node-far node-long-stack-traces))
-      (home-page "https://github.com/felixge/node-stack-trace";)
-      (synopsis "Get v8 stack traces as an array of CallSite objects")
-      (description "Get v8 stack traces as an array of CallSite objects.")
-      (license license:expat))))
+                                pkg-meta-alist))))))))
+       #:tests? #f))
+    (synopsis "Abstract base class for Node SerialPort bindings")
+    (description "Node SerialPort is a modular suite of Node.js packages for
+accessing serial ports.  The Guix package @code{node-serialport} provides the
+recommended high-level interface.
 
-(define-public node-statsd-parser
-  (package
-    (name "node-statsd-parser")
-    (version "0.0.4")
-    (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-               (url "https://github.com/dscape/statsd-parser";)
-               (commit version)))
-        (file-name (git-file-name name version))
-        (sha256
-         (base32
-          "049rnczsd6pv6bk282q4w72bhqc5cs562djgr7yncy7lk0wzq5j3"))))
-    (build-system node-build-system)
-    (arguments '(#:tests? #f)) ; No tests.
-    (home-page "https://github.com/dscape/statsd-parser";)
-    (synopsis "Streaming parser for the statsd protocol")
-    (description "This package provides a streaming parser for the statsd
-protocol used in @code{node-lynx}.")
-    (license license:asl2.0)))
+This package provides the @code{Binding} class, which uses a native addon to
+talk to the underlying system.  You never have to use @code{Binding} objects
+directly.  There is also a @code{MockBinding} available (but not yet packaged
+for Guix) to assist with testing.")))
 
-(define-public node-string-decoder
-  (package
-    (name "node-string-decoder")
-    (version "1.3.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/nodejs/string_decoder";)
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "0xxvyya9fl9rlkqwmxzqzbz4rdr3jgw4vf37hff7cgscxkhg266k"))))
-    (build-system node-build-system)
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-dependencies 'delete-dependencies
-           (lambda args
-             (delete-dependencies
-              '("tap" "core-util-is" "babel-polyfill")))))
-       ;; FIXME: Tests depend on node-tap
-       #:tests? #f))
-    (inputs (list node-safe-buffer node-inherits))
-    (home-page "https://github.com/nodejs/string_decoder";)
-    (synopsis "Decode buffers while preserving multi-byte sequences")
-    (description "This package provides a user-land implementation of
-Node-core's @code{string_decoder}, which serves to decode buffers to
-strings so that the decoded string does not contain incomplete multibyte
-sequences.")
-    (license license:expat)))
-
-(define-public node-util-deprecate
-  (package
-    (name "node-util-deprecate")
-    (version "1.0.2")
-    (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-               (url "https://github.com/TooTallNate/util-deprecate";)
-               (commit version)))
-        (file-name (git-file-name name version))
-        (sha256
-         (base32
-          "1rk94nl3qc7znsk8400bnga30v0m7j2mmvz9ldwjinxv1d3n11xc"))))
-    (build-system node-build-system)
-    (arguments '(#:tests? #f)) ; No test suite.
-    (home-page "https://github.com/TooTallNate/util-deprecate";)
-    (synopsis "Node.js `util.deprecate()` function with browser support")
-    (description "This package provides the Node.js @code{util.deprecate()}
-function with browser support.")
-    (license license:expat)))
-
-(define-public node-wrappy
-  (package
-    (name "node-wrappy")
-    (version "1.0.2")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/npm/wrappy";)
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1ymlc61cja6v5438vwb04gq8wg2b784lj39zf0g4i36fvgcw9783"))))
-    (build-system node-build-system)
-    (arguments
-     '(#:tests? #f ; FIXME: Tests depend on node-tap
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-dependencies 'delete-dependencies
-           (lambda args
-             (delete-dependencies '("tap")))))))
-    (home-page "https://github.com/npm/wrappy";)
-    (synopsis "Callback wrapping utility")
-    (description "@code{wrappy} is a utility for Node.js to wrap callbacks.")
-    (license license:isc)))
-
-(define-public node-serialport-binding-abstract
-  (package
-    (name "node-serialport-binding-abstract")
-    (version "9.2.3")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/serialport/node-serialport";)
-             (commit "v9.2.7")))
-       (file-name (git-file-name "serialport-monorepo" version))
-       (sha256
-        (base32 "0x7zm59a5ff5yygjyw15xs3r5m3rb8av1yfrh4snn44mrwq87yg8"))))
-    (inputs
-     (list node-debug))
-    (build-system node-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda args
-             (chdir "packages/binding-abstract"))))
-       #:tests? #f))
-    (home-page "https://serialport.io";)
-    (synopsis "Abstract base class for Node SerialPort bindings")
-    (description "Node SerialPort is a modular suite of Node.js packages for
-accessing serial ports.  The Guix package @code{node-serialport} provides the
-recommended high-level interface.
-
-This package provides the @code{AbstractBinding} class, the base for all Node
-SerialPort bindings.  You wouldn't use this class directly, but instead extend
-it to make a new binding for a different platform or underling technology.")
-    (license license:expat)))
-
-(define-public node-serialport-parser-delimiter
-  (package
-    (inherit node-serialport-binding-abstract)
-    (name "node-serialport-parser-delimiter")
-    (version "9.2.4")
-    (inputs `())
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda args
-             (chdir "packages/parser-delimiter"))))
-       #:tests? #f))
-    (synopsis "Node SerialPort parser to split data on a delimiter")
-    (description "Node SerialPort is a modular suite of Node.js packages for
-accessing serial ports.  The Guix package @code{node-serialport} provides the
-recommended high-level interface.
-
-Parsers are used to take raw binary data and transform them into usable
-messages.  This package provides @code{Delimiter}, a parser that emits data
-each time a specified byte sequence is received.")))
-
-(define-public node-serialport-parser-readline
-  (package
-    (inherit node-serialport-binding-abstract)
-    (name "node-serialport-parser-readline")
-    (version "9.2.4")
-    (inputs
-     (list node-serialport-parser-delimiter))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda args
-             (chdir "packages/parser-readline"))))
-       #:tests? #f))
-    (synopsis "Node SerialPort parser to split data on newlines")
-    (description "Node SerialPort is a modular suite of Node.js packages for
-accessing serial ports.  The Guix package @code{node-serialport} provides the
-recommended high-level interface.
-
-Parsers are used to take raw binary data and transform them into usable
-messages.  This package provides @code{Readline}, a parser that emits data
-after a (configurable) newline delimiter is received.")))
-
-(define-public node-serialport-bindings
-  (package
-    (inherit node-serialport-binding-abstract)
-    (name "node-serialport-bindings")
-    (version "9.2.7")
-    (native-inputs
-     (list python))
-    (inputs
-     (list node-nan node-bindings node-serialport-binding-abstract
-           node-serialport-parser-readline node-debug))
-    (arguments
-     `(#:modules
-       ((guix build node-build-system)
-        (srfi srfi-1)
-        (ice-9 match)
-        (guix build utils))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda args
-             (chdir "packages/bindings")))
-         (add-after 'patch-dependencies 'delete-dependencies
-           (lambda args
-             (delete-dependencies `("prebuild-install"
-                                    ;; devDependencies
-                                    "@serialport/binding-mock"
-                                    "node-abi"))))
-         (add-after 'chdir 'avoid-prebuild-install
-           (lambda args
-             (with-atomic-json-file-replacement "package.json"
-               (match-lambda
-                 (('@ . pkg-meta-alist)
-                  (cons '@ (map (match-lambda
-                                  (("scripts" @ . scripts-alist)
-                                   `("scripts" @ ,@(filter (match-lambda
-                                                             (("install" . _)
-                                                              #f)
-                                                             (_
-                                                              #t))
-                                                           scripts-alist)))
-                                  (("gypfile" . _)
-                                   '("gypfile" . #f))
-                                  (other
-                                   other))
-                                pkg-meta-alist))))))))
-       #:tests? #f))
-    (synopsis "Abstract base class for Node SerialPort bindings")
-    (description "Node SerialPort is a modular suite of Node.js packages for
-accessing serial ports.  The Guix package @code{node-serialport} provides the
-recommended high-level interface.
-
-This package provides the @code{Binding} class, which uses a native addon to
-talk to the underlying system.  You never have to use @code{Binding} objects
-directly.  There is also a @code{MockBinding} available (but not yet packaged
-for Guix) to assist with testing.")))
-
-(define-public node-serialport-parser-regex
+(define-public node-serialport-parser-regex
   (package
     (inherit node-serialport-binding-abstract)
     (name "node-serialport-parser-regex")
@@ -1699,6 +1434,271 @@ 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-sqlite3
+  (package
+    (name "node-sqlite3")
+    (version "5.0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mapbox/node-sqlite3";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0sbbzzli282nxyfha10zx0k5m8hdp0sf3ipl59khjb7wm449j86h"))
+       (snippet
+        (with-imported-modules '((guix build utils))
+          #~(begin
+              (use-modules (guix build utils))
+              ;; unbundle sqlite
+              (for-each delete-file-recursively
+                        (find-files "deps"
+                                    (lambda (pth stat)
+                                      (gzip-file? pth)))))))))
+    (inputs
+     (list node-addon-api python sqlite))
+    (build-system node-build-system)
+    (arguments
+     `(#:modules
+       ((guix build node-build-system)
+        (srfi srfi-1)
+        (ice-9 match)
+        (guix build utils))
+       #:tests? #f ; FIXME: tests depend on node-mocha
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies
+              `(;; Normally, this is "built" using @mapbox/node-pre-gyp,
+                ;; which publishes or downloads pre-built binaries or
+                ;; falls back to building from source.  Here, we patch out
+                ;; all of that and just build directly.  It might be
+                ;; better to patch a version of @mapbox/node-pre-gyp that
+                ;; always builds from source, as Debian does, but there
+                ;; are a number of dependencies that need to be packaged
+                ;; or removed.
+                "@mapbox/node-pre-gyp"
+                "node-pre-gyp" ;; deprecated name still used in some places
+                "aws-sdk"
+                "@mapbox/cloudfriend"
+                ;; Confusingly, this is only a dependency because of
+                ;; @mapbox/node-pre-gyp: with that removed,
+                ;; npm will use its own copy:
+                "node-gyp"
+                ;; These we'd like, we just don't have them yet:
+                "eslint"
+                "mocha"))))
+         (add-before 'configure 'npm-config-sqlite
+           ;; We need this step even if we do replace @mapbox/node-pre-gyp
+           ;; because the package expects to build its bundled sqlite
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "npm_config_sqlite" (assoc-ref inputs "sqlite"))))
+         (add-after 'install 'patch-binding-path
+           ;; We replace a file that dynamic searches for the addon using
+           ;; node-pre-gyp (which we don't have) with a version that
+           ;; simply uses the path to the addon we built directly.
+           ;; The exact path is supposed to depend on things like the
+           ;; architecture and napi_build_version, so, to avoid having
+           ;; hard-code the details accurately, we do this after the addon
+           ;; has been built so we can just find where it ended up.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (with-directory-excursion
+                 (search-input-directory outputs
+                                         "lib/node_modules/sqlite3/lib")
+               (match (find-files "binding" "\\.node$")
+                 ((rel-path)
+                  (with-atomic-file-replacement "sqlite3-binding.js"
+                    (lambda (in out)
+                      (format out "var binding = require('./~a');\n" rel-path)
+                      (display "module.exports = exports = binding;\n"
+                               out))))))))
+         (add-after 'patch-dependencies 'avoid-node-pre-gyp
+           (lambda args
+             ;; We need to patch .npmignore before the 'repack phase
+             ;; so that the built addon is installed with in the package.
+             ;; (Upstream assumes node-pre-gyp will download a pre-built
+             ;; version when this package is installed.)
+             (substitute* ".npmignore"
+               (("lib/binding")
+                "#lib/binding # <- patched for Guix"))
+             (with-atomic-json-file-replacement "package.json"
+               (match-lambda
+                 (('@ . pkg-meta-alist)
+                  (match (assoc-ref pkg-meta-alist "binary")
+                    (('@ . binary-alist)
+                     ;; When it builds from source, node-pre-gyp supplies
+                     ;; module_name and module_path based on the entries under
+                     ;; "binary" from "package.json", so this package's
+                     ;; "binding.gyp" doesn't define them. Thus, we also need
+                     ;; to supply them. The GYP_DEFINES environment variable
+                     ;; turns out to be the easiest way to make sure they are
+                     ;; propagated from npm to node-gyp to gyp.
+                     (setenv "GYP_DEFINES"
+                             (string-append
+                              "module_name="
+                              (assoc-ref binary-alist "module_name")
+                              " "
+                              "module_path="
+                              (assoc-ref binary-alist "module_path")))))
+                  ;; We need to remove the install script from "package.json",
+                  ;; as it would try to use node-pre-gyp and would block the
+                  ;; automatic building performed by `npm install`.
+                  (cons '@ (map (match-lambda
+                                  (("scripts" @ . scripts-alist)
+                                   `("scripts" @ ,@(filter (match-lambda
+                                                             (("install" . _)
+                                                              #f)
+                                                             (_
+                                                              #t))
+                                                           scripts-alist)))
+                                  (other
+                                   other))
+                                pkg-meta-alist))))))))))
+    (home-page "https://github.com/mapbox/node-sqlite3";)
+    (synopsis "Node.js bindings for SQLite3")
+    (description
+     "@code{node-sqlite3} provides a set of a Node.js bindings for interacting
+with SQLite3 databases.")
+     (license license:bsd-3)))
+
+(define-public node-stack-trace
+  ;; There have been improvements since the last release.
+  (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
+        (revision "1"))
+    (package
+      (name "node-stack-trace")
+      (version (git-version "0.0.10" revision commit))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                 (url "https://github.com/felixge/node-stack-trace";)
+                 (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            "1pk19wcpy8i95z5jr77fybd57qj7xmzmniap4dy47vjlmpkqia4i"))))
+      (build-system node-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+         (add-before 'check 'skip-intentionally-failing-test
+           (lambda _
+             (substitute* "test/run.js"
+               (("far.include") "far.exclude(/test-parse.js/)\nfar.include"))
+             #t)))))
+      (native-inputs
+       (list node-far node-long-stack-traces))
+      (home-page "https://github.com/felixge/node-stack-trace";)
+      (synopsis "Get v8 stack traces as an array of CallSite objects")
+      (description "Get v8 stack traces as an array of CallSite objects.")
+      (license license:expat))))
+
+(define-public node-statsd-parser
+  (package
+    (name "node-statsd-parser")
+    (version "0.0.4")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/dscape/statsd-parser";)
+               (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "049rnczsd6pv6bk282q4w72bhqc5cs562djgr7yncy7lk0wzq5j3"))))
+    (build-system node-build-system)
+    (arguments '(#:tests? #f)) ; No tests.
+    (home-page "https://github.com/dscape/statsd-parser";)
+    (synopsis "Streaming parser for the statsd protocol")
+    (description "This package provides a streaming parser for the statsd
+protocol used in @code{node-lynx}.")
+    (license license:asl2.0)))
+
+(define-public node-string-decoder
+  (package
+    (name "node-string-decoder")
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/nodejs/string_decoder";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0xxvyya9fl9rlkqwmxzqzbz4rdr3jgw4vf37hff7cgscxkhg266k"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies
+              '("tap" "core-util-is" "babel-polyfill")))))
+       ;; FIXME: Tests depend on node-tap
+       #:tests? #f))
+    (inputs (list node-safe-buffer node-inherits))
+    (home-page "https://github.com/nodejs/string_decoder";)
+    (synopsis "Decode buffers while preserving multi-byte sequences")
+    (description "This package provides a user-land implementation of
+Node-core's @code{string_decoder}, which serves to decode buffers to
+strings so that the decoded string does not contain incomplete multibyte
+sequences.")
+    (license license:expat)))
+
+(define-public node-util-deprecate
+  (package
+    (name "node-util-deprecate")
+    (version "1.0.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/TooTallNate/util-deprecate";)
+               (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1rk94nl3qc7znsk8400bnga30v0m7j2mmvz9ldwjinxv1d3n11xc"))))
+    (build-system node-build-system)
+    (arguments '(#:tests? #f)) ; No test suite.
+    (home-page "https://github.com/TooTallNate/util-deprecate";)
+    (synopsis "Node.js `util.deprecate()` function with browser support")
+    (description "This package provides the Node.js @code{util.deprecate()}
+function with browser support.")
+    (license license:expat)))
+
+(define-public node-wrappy
+  (package
+    (name "node-wrappy")
+    (version "1.0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/npm/wrappy";)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1ymlc61cja6v5438vwb04gq8wg2b784lj39zf0g4i36fvgcw9783"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f ; FIXME: Tests depend on node-tap
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies '("tap")))))))
+    (home-page "https://github.com/npm/wrappy";)
+    (synopsis "Callback wrapping utility")
+    (description "@code{wrappy} is a utility for Node.js to wrap callbacks.")
+    (license license:isc)))
+
 (define-public node-yazl
   (package
     (name "node-yazl")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]