From patchwork Wed Dec 8 20:28:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35039 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8B67E27BBEA; Wed, 8 Dec 2021 20:31:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1961827BBE9 for ; Wed, 8 Dec 2021 20:31:08 +0000 (GMT) Received: from localhost ([::1]:47736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mv3al-0000CU-7W for patchwork@mira.cbaines.net; Wed, 08 Dec 2021 15:31:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mv3a0-0006lc-2y for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:21 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mv3Zy-0000aR-Pq for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mv3Zy-00062h-H8 for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:18 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v3 36/43] gnu: Add node-serialport-bindings. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Dec 2021 20:30:18 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51838@debbugs.gnu.org Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163899539522903 (code B ref 51838); Wed, 08 Dec 2021 20:30:18 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Dec 2021 20:29:55 +0000 Received: from localhost ([127.0.0.1]:41649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Zb-0005xE-C2 for submit@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:55 -0500 Received: from mail-vk1-f182.google.com ([209.85.221.182]:40510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Z8-0005tv-QK for 51838@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:27 -0500 Received: by mail-vk1-f182.google.com with SMTP id 70so2357451vkx.7 for <51838@debbugs.gnu.org>; Wed, 08 Dec 2021 12:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UDvwQMONhN/F5H1yDlPcjsz1nGLDvlWAq4wI23KTY5E=; b=ScdvYtNWQYBws7VeixMoGogvWsD3k/+Pr21LjuvfU2pX1HjzbZrj+ko8TVnoyhW2pb DZ5njApqNFGKk+fqPyhRMXtaMZ8uFkhgcZMyI9RBKD+knDCLxjGlX0AcvmUZP9gnlRO9 0s13Ww9Kd7KZTLXPT61+Z4I3LtkjOB2c4j16PF692xSZ6tl3vUqbLLo/CdhMCAcS7pBZ FzSDE4UwhWXqzNYMBHrISXNEp2a+hasKUCy4x3eX54k4ieRgOmvkC9uzadYkvyoCWH+L QrAThtlxGAWqggVq1PeiVtQc++1drk6rq/+/mgZK9FyWUsbfzAuxnWDDtNi4c64LtTR7 l5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UDvwQMONhN/F5H1yDlPcjsz1nGLDvlWAq4wI23KTY5E=; b=Wtqa+22hL2+1fxs7ayCH4OvZYtwD/mTXsjL6Pnrn+PfvNLmyWTudVQSRMewxqwXEXf nbaMmXjZ5QoIEyLlOvWC77LY5iGOhkAeDtwY+lPCWnSQAAj5V4Wjb6QJ+HrRCOTs2/4g bsJQ/GoelcxpuKlZQJc+iG/8gx8DN9nE3Agym0EjFqpN3gtEbRgS7dQjeBW0IKxmYz4B g/1f7fS4jpTkGqj70bYbnm+OgKiEsmkhU+gWsmCBh+D/9maXRDwzo6JfruVfQCFHtan9 enKKed5xN/VOfsqaAH5bPBo2/H/rsAidH3FRMuBSxPeWH+O51EaeYk6XiEwUKrtEV7Q8 Gz4g== X-Gm-Message-State: AOAM530aDRTGno9/ueiERb9IITc+E43bWQywfZE6t7BaU74HvbzfEWwY TLZR+iLPYlQ7nREQiNU4wYV5wT+4jWNbeL9Vz0A= X-Google-Smtp-Source: ABdhPJy0CaJgsYrMU5HSgkYtXDuxamYxD3PNvspOPrlRSEKgprHYROe3Epln2w2u/7PITOgvRf2rIg== X-Received: by 2002:a1f:3f4f:: with SMTP id m76mr1239713vka.1.1638995361251; Wed, 08 Dec 2021 12:29:21 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id f7sm2428672vkm.31.2021.12.08.12.29.20 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Dec 2021 12:29:21 -0800 (PST) From: Philip McGrath Date: Wed, 8 Dec 2021 15:28:31 -0500 Message-Id: <20211208202838.752542-37-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211208202838.752542-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node-xyz.scm (node-serialport-bindings): New variable. --- gnu/packages/node-xyz.scm | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 495fc6f854..a60ec33506 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -970,3 +970,59 @@ (define-public node-serialport-parser-readline 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 + `(("python" ,python))) + (inputs + `(("node-nan" ,node-nan) + ("node-bindings" ,node-bindings) + ("node-serialport-binding-abstract" ,node-serialport-binding-abstract) + ("node-serialport-parser-readline" ,node-serialport-parser-readline))) + (arguments + `(#:absent-dependencies + `("debug" + "prebuild-install" + ;; devDependencies + "@serialport/binding-mock" + "node-abi") + #:modules + ((guix build node-build-system) + (guix build json) + (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 'chdir 'avoid-prebuild-install + (lambda args + (with-atomic-file-replacement "package.json" + (lambda (in out) + (match (read-json in) + (('@ . meta-alist) + (match (assoc-ref meta-alist "scripts") + (('@ . scripts-alist) + (write-json + (cons '@ (assoc-set! + meta-alist + "scripts" + (cons '@ (assoc-remove! scripts-alist + "install")))) + out)))))))))) + #: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.")))