From patchwork Thu Dec 30 07:44:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35834 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 A394727BBEA; Thu, 30 Dec 2021 07:52:25 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 3295727BBE9 for ; Thu, 30 Dec 2021 07:52:25 +0000 (GMT) Received: from localhost ([::1]:39786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2qEa-0001bV-AI for patchwork@mira.cbaines.net; Thu, 30 Dec 2021 02:52:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2qEI-0000wp-Bx for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2qEI-0007Dy-0t for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2qEI-0007FL-0Q for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v7 34/41] gnu: Add node-serialport-bindings. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Dec 2021 07:52:05 +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 Cc: Timothy Sample , Pierre Langlois , Jelle Licht , Philip McGrath , Liliana Marie Prikler Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.164085068727692 (code B ref 51838); Thu, 30 Dec 2021 07:52:05 +0000 Received: (at 51838) by debbugs.gnu.org; 30 Dec 2021 07:51:27 +0000 Received: from localhost ([127.0.0.1]:51258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2qDf-0007CT-7q for submit@debbugs.gnu.org; Thu, 30 Dec 2021 02:51:27 -0500 Received: from mail-ua1-f46.google.com ([209.85.222.46]:42657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2qAP-0006zP-38 for 51838@debbugs.gnu.org; Thu, 30 Dec 2021 02:48:05 -0500 Received: by mail-ua1-f46.google.com with SMTP id p1so19195572uap.9 for <51838@debbugs.gnu.org>; Wed, 29 Dec 2021 23:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GzX7YDJfYBd5qLRpa4HzqWVGpDQ/iqulhTel0wc5uEE=; b=kug0g6IyWIAlwOctskGrzpVOzm6EDhAJjIZWKlgHbtYowUhsvP20RD0p+ah5WaZErz 10dxhrvH0AzseZ7/dTHdukjeduNzPP/pJ5QRggWOQtyK44vsJFVUMPYbxElWdJCKv7iC eodjvbBr4rIDmUaizuIlqKp8Z5k+RCO15g9TxySurdM2qJsBVnNS6z81xOf4x+BQIaWz KDup0OnxP4cNARxh96LBTo7PGQw0Hl0Ccqj05V2wo4x9sYikAe2wxCy+tc7NzwVpKIl6 E5UMJLxMRxfab/jYMOHeEnpyTxkWydcYy9YBzD66ZZzHccXF8BsNExQ8cXLw3VEo96qd AdhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GzX7YDJfYBd5qLRpa4HzqWVGpDQ/iqulhTel0wc5uEE=; b=mqh/qfkO+/bTHCTAC/ic43fIVbJz1RvK2lz86CMVPtD5IR8avZXTI77KCPLjzU1CL2 q+QMLPPV2OdCdAjKf7hzbTcTMM3re9vQNqXcCYyvJ11Ic7wzVzroc16wbIyU+69DpsFc q6ln5FvhgiIKH9MF7rdsykbGsJPiHqG1JmKSY1/wHty8VPRbq/qS/7KUN/dgWlf2YXIZ nZ7vH88KYnWFN/yE2INzc7LQVSGflOHPgJ0Dt7p05PIlS7ZsUT4pU6OrPDSStTVmvKlx wnxmYhwEPb0RwlO82JGgiRPINRr1bfDi7D9vJIqaxwkHflliHrHndtqkY7MAekPDH5hx ti1Q== X-Gm-Message-State: AOAM530Ptqyv5+UpBuiWyqkmMc93BWVukpfqPqxN+/sxW4GJHhZN0XCb V+sy1dTbm0hikMS/96WbzcGUGpJSKMbkfHzi X-Google-Smtp-Source: ABdhPJxU8ymd44HTJ2bu3pBvahR9YiXG703RhTXA1kifkNxLL+g4/zdr9g/nhpOiR9quCTnkIdhSsQ== X-Received: by 2002:ab0:6485:: with SMTP id p5mr7550832uam.126.1640850479567; Wed, 29 Dec 2021 23:47:59 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with UTF8SMTPSA id y17sm4870909uaa.9.2021.12.29.23.47.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 23:47:59 -0800 (PST) From: Philip McGrath Date: Thu, 30 Dec 2021 02:44:49 -0500 Message-Id: <20211230074456.33433-35-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211230074456.33433-1-philip@philipmcgrath.com> References: <20211230073919.30327-1-philip@philipmcgrath.com> <20211230074456.33433-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 | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index ca18e5055e..4495ea9b68 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1072,3 +1072,56 @@ (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 + (list python)) + (inputs + (list node-nan node-bindings node-serialport-binding-abstract + node-serialport-parser-readline node-debug)) + (arguments + `(#:absent-dependencies + `("prebuild-install" + ;; devDependencies + "@serialport/binding-mock" + "node-abi") + #: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 '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))) + (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.")))