From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wDsFDo9wzWHdFQEAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 09:40:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OG+7Bo9wzWEMBgEAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 09:40:47 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 46BCFD17B for ; Thu, 30 Dec 2021 09:40:46 +0100 (CET) Received: from localhost ([::1]:39786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2qEb-0001bV-23 for larch@yhetil.org; Thu, 30 Dec 2021 02:52:25 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640853646; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GzX7YDJfYBd5qLRpa4HzqWVGpDQ/iqulhTel0wc5uEE=; b=BwoE+pMrJnAVf/sRsT3JjnkjwcIRU5QwLU8svPfZZzRFHnSk75uhq8j7mLjtTOYPc4Dzgs tRftU72JE/oRvTBzHt5pEqzYmNqufD2NrDNa4HSFmO6UW7rR6Am9kaa7WNloOfD6nQQHN5 GYSuNH6vJmilCiPzSYBcexnA64t01E3eA8fazsfp9FrnD0gqDO8paqkKDY1w3BgHQIgj2J 8ksxCukRng6p5VaU7PQc4PPYjEWsgPcSS2aAiGzL9TH4JAmHg9tNT2L0w6n3+D794rhncO sXXo1rKh6uWUTV+4cc7HZWUapwMrqwOXnDIT8b6z3Jd/+mu5UgyG6Czd1Fv7Jg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640853646; a=rsa-sha256; cv=none; b=rl4Azw0HwfHpMlgD1QXsrYJn9ux+SrCS19INMA1TvUiNYmndDebsF4fH74/ihqqxXs5ysw WKfSadDMHwSGRCw3DAbBCCrYp2Xln493DMSw97zEPxUvo3GipaGfi8NGEnmQifGXqSj9HP 56O+DmIhsgOG2P4xzYIk3h2bG/j0mpuByfGgvTyvYVQQJU8cN+Bbo7t1WoU10q+gqKFkVZ ka1G1V+mSOai7DvNW/XM5a7za89/xboj0M4T/cgxKQzhAquVcec8dlttjIfzCojXsznr6M xb1ro7nnUYGsehPWETQ7HNRFqDAbA6Oh9a6yy1aSXlTs7Mb0MAhWwX2i/dQcuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kug0g6Iy; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kug0g6Iy; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 46BCFD17B X-Spam-Score: 0.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: sVjTr2Xx9EVl * 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."))) -- 2.32.0