From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mOS5FOtjzWHYyQAAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 08:46:51 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SCFmDetjzWESrQAAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 08:46:51 +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 aspmx2.migadu.com (Postfix) with ESMTPS id C2B881EA74 for ; Thu, 30 Dec 2021 08:46:50 +0100 (CET) Received: from localhost ([::1]:59284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2q9B-0003S7-RH for larch@yhetil.org; Thu, 30 Dec 2021 02:46:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2q6c-0001Nw-2r for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2q6b-0001wS-Ov for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2q6b-0006kS-OU for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v6 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:44:09 +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.164085020725711 (code B ref 51838); Thu, 30 Dec 2021 07:44:09 +0000 Received: (at 51838) by debbugs.gnu.org; 30 Dec 2021 07:43:27 +0000 Received: from localhost ([127.0.0.1]:51070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q5v-0006gX-6Y for submit@debbugs.gnu.org; Thu, 30 Dec 2021 02:43:27 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:33338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q5Z-0006cw-Nu for 51838@debbugs.gnu.org; Thu, 30 Dec 2021 02:43:06 -0500 Received: by mail-qk1-f180.google.com with SMTP id de30so22051352qkb.0 for <51838@debbugs.gnu.org>; Wed, 29 Dec 2021 23:43: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=mwZWa7x8qRS2TTsQ9loz8Iqp+6b2AUfase9op7CjaYM=; b=CvrdAWRT9wXSmy1MNcyizuxrJa1vL/sm3zreMrRCELp/sB1h+P52LrzKe4oTbP5Jbx 4AOaeV5KrWNx2gRrzPYKhzS8r8Y+mkydywtRTNCMUOM2fawZA1LRlWiAVADHm+Vre/DN QkEYQzZxVxPhOAW2O0vc/rEFkZe6VALqinkQ4N/oK4R1nMuVNLfHWfc5lMuiNsGqbuZ8 12RP9wxvHc2leYYz6kjjAk17J0XtuxZR9wb6U5VmIfiZ5WdxRS3ac0XQmdi0fTqE6qts 7YtXsmY5cSr/X1hs/Xt/lbbQYYYLLqrXXVcY1ftc1UmzxPRWPsJMRlsm41Tpi9n99S/H S1xQ== 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=mwZWa7x8qRS2TTsQ9loz8Iqp+6b2AUfase9op7CjaYM=; b=cnvulbk1tXP/ymZXwH63LQYEFxIDWfGWjP2l5eyPWZFv150zTuP36ATum3IOXuzyJS CrMctOnEuFXnxRri4c3JopAfRfX78ydbiGm8oywoauuLafJ+tJfVbrvjpa12w6V52JJS BSCzqlF1HEpsqxsVgQPndzPscqoK1EI5RtU+3FX3ZeUmfz/eJp+3uAjVjS5z9Q8+6W6d 1AxEWMWtC0EvAdwJAMHEG/NvbA6dp8qA2B8LJwBeNF3fxb3HTQDWmFj3VAJgnMbGpvBZ T6tqZWF06akPyZaQm+LdnrbME3PmsN8FVaKUmRWG0qNeGtKMRHEEAtWLEEOZTfyu5fIr Dy1Q== X-Gm-Message-State: AOAM531F8oTOoVgaI8UbpBauyAYeBjNL10YUd7KkD6AOmkFnz/sgBhl3 Zm4JtSpV3B2HZstrniQ32jM2p54hvRec0xxc X-Google-Smtp-Source: ABdhPJwKQQAPafKD6Q1PB1T/uO/CRgpxfYerREqZx4kotF4nxSaasL6EYWoNJpLqSJ5/KRHuIuRNNg== X-Received: by 2002:a05:620a:754:: with SMTP id i20mr20669695qki.312.1640850180253; Wed, 29 Dec 2021 23:43:00 -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 p67sm16401774qkf.49.2021.12.29.23.42.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 23:43:00 -0800 (PST) From: Philip McGrath Date: Thu, 30 Dec 2021 02:39:12 -0500 Message-Id: <20211230073919.30327-35-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211230073919.30327-1-philip@philipmcgrath.com> References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-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=1640850410; 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=mwZWa7x8qRS2TTsQ9loz8Iqp+6b2AUfase9op7CjaYM=; b=fquvyGaW4dxhmP30RSY9KyTSfwxLqg1wR5cDcY5Za3jcZ2ZJRecoBuo/P9Ri3W3zRI2HCu IlObB5ZpgIKfDeJaC76/9smkcjS76Ha8yqQjxkzzbwZWF+7sY2y+hV+zobD3Bds/ecwmtP QJvISNMMA7TA0ym4Rh8L6rr8Z0m0w+twsi+ImOKvqMkZWLpp16j/PsngawhJtRChJN/80Y f0GVJlZ+SsPK6FffeDfgJUemCvke3zJZyL7xhVtwtDut6xymqjWdFr/4SsT9StVZxLkhsB hPsnNVnKzYwHYNc+ZFgJIQs2fMzbk4ImPCSyWs+cZeT3WUYTlEqam9SempJlrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640850410; a=rsa-sha256; cv=none; b=GP5wpiqMixDvM50EUucrXmLRMQO28L0NHK90FHq7T8E4rjsPPKx06wsA0k9m5Eu0fuHQ2X 2hQPjieJSJ4+YBq/foWxmypI9bhT7TnLG8nvblv8vB0Z1KBryl9vELPTwqxgPzsr2DDup3 9Ul4oeGd+S/TK9hUlUaEZzz8V1SDO3W6UTfEz8//xtN9Q5VoHymFHLN3zNaTt33KHMmKRa /0tHAbKZbcaFYEbBBbYj5h+eMs+fGIn1O4N94EElP0OdfdPEPsjA1UD70EC5g1Re+xwHjG DFPX4bpiCFUx7KZh/Knlc6MvjL2vdTlHZS7tBmyaA+zitlj3XJWOcusZEnrO4g== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=CvrdAWRT; dmarc=none; spf=pass (aspmx2.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.57 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=CvrdAWRT; dmarc=none; spf=pass (aspmx2.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: C2B881EA74 X-Spam-Score: -0.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: rs7wp1zYqD4j * 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 e33a35a0a0..fe1a2d4e5f 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1149,3 +1149,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 + (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 + (with-atomic-json-file-replacement "package.json" + (lambda (pkg-meta) + (delete-dependencies pkg-meta `("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))) + (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