From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mJ96FgHxu2EvMgEAgWs5BA (envelope-from ) for ; Fri, 17 Dec 2021 03:08:01 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YJweEgHxu2F7bwAAbx9fmQ (envelope-from ) for ; Fri, 17 Dec 2021 02:08:01 +0000 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 E11CD3576A for ; Fri, 17 Dec 2021 03:08:00 +0100 (CET) Received: from localhost ([::1]:55770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my2fA-0006vT-2P for larch@yhetil.org; Thu, 16 Dec 2021 21:08:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my2eH-0005fT-BU for guix-patches@gnu.org; Thu, 16 Dec 2021 21:07:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1my2eH-0008HP-3C for guix-patches@gnu.org; Thu, 16 Dec 2021 21:07:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1my2eG-0005I0-U7 for guix-patches@gnu.org; Thu, 16 Dec 2021 21:07:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v5 38/45] gnu: Add node-serialport-bindings. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Dec 2021 02:07:04 +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.163970679720207 (code B ref 51838); Fri, 17 Dec 2021 02:07:04 +0000 Received: (at 51838) by debbugs.gnu.org; 17 Dec 2021 02:06:37 +0000 Received: from localhost ([127.0.0.1]:37401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my2dp-0005Fl-2F for submit@debbugs.gnu.org; Thu, 16 Dec 2021 21:06:37 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:40709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my2df-0005EN-25 for 51838@debbugs.gnu.org; Thu, 16 Dec 2021 21:06:27 -0500 Received: by mail-qt1-f172.google.com with SMTP id t34so1196830qtc.7 for <51838@debbugs.gnu.org>; Thu, 16 Dec 2021 18:06:27 -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=D+HtodE2T5IPa2GBofP9xdVEGRubonIxpApSbpcmptw=; b=LhD+WeM3aOiVFz2irnmbPC7LAzutyErfefxvJki3a99TseUw0s5HPnDBaG2fz1E7Q3 bePcjltcrwKTkw4nRMBIWNP0vGlIPF7foDSkm8QQ7uQZGmaUPW9IaISJyz5RJqtXX8i0 ggQu+2rtmwCZeRKMjXWE1aLPss5qIs8/r61W/fDijNKcQ0/fOAxMZPfmxQRN8HE70hXn EK5akkmNYb3zxErbIX/D8lC3wpmjeHGNtgX85sEGZIbka9qHdnGfJM8xW7iHNQqOzI++ RIzUTQCdnMIujUOO3ZavYSsS9hLD20Aab/QVWG1D3ihg7jAYW3kZ4hIJgV/BMAbTvKpt doqA== 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=D+HtodE2T5IPa2GBofP9xdVEGRubonIxpApSbpcmptw=; b=SpfKOFW5qOp/3PmXPknuleK7LkadQfH2k/IznsCebCiBaCcY8dgFIz6z6pn1UxOyc3 DNT60UMUHi5DG5yFOwZaBlYdKtSVQAAZkLb/Zl15w9F+PqrwHMIldj7XSjplMAbWKz6l 3GzDg45f7ZnHFB4OL30z/fxpE8ICdM7rBBY+V5bjO+BXRsjDlNBG5pC579rFQFV/PaKP Nv2fZb5BKg77fUP9oKfrT9ZEIv4IQ3ITZ7GVkAuhOt4hBAA5HY/h4IGX0ivqqXLd7f7f DDhOnNSTCecguKBUAOjO81dyeHgPweSSUNHMF/ixKwn2dVl0sAXLx2y13nXl2N124R9w Nsyg== X-Gm-Message-State: AOAM533jeH1EbLq5F899r34tU23rfP3H7cOl952Rl4QYpeVs7uMNc4KH 30uKBNNU48wS6TiFOtYqc7mAvuqwwljQgBbjkQg= X-Google-Smtp-Source: ABdhPJwOeh20C4PHP661NlNlv0Pa4YEJJW2xfJTL4BOgOr9zZJ2qIrNz3bi24MU72dd7KNzq4cgkRg== X-Received: by 2002:a05:622a:216:: with SMTP id b22mr731907qtx.148.1639706781713; Thu, 16 Dec 2021 18:06: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 bq36sm3934243qkb.6.2021.12.16.18.06.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Dec 2021 18:06:21 -0800 (PST) From: Philip McGrath Date: Thu, 16 Dec 2021 21:03:18 -0500 Message-Id: <20211217020325.520821-39-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211217020325.520821-1-philip@philipmcgrath.com> References: <20211213060107.129223-1-philip@philipmcgrath.com> <20211217020325.520821-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=1639706881; 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=D+HtodE2T5IPa2GBofP9xdVEGRubonIxpApSbpcmptw=; b=FDKQIq5DYhrjYFeV4LLE0Ysumn2q07EfmdzrV+kHfzc7BjSj62tvW9M3BDq+hIbTes78+s yUUsj7ZvZ2mgJqaUpbnTkFfNR29fG78+gKMVhSlSAEmUB6maV80GHw5jQvRfEbYMCRoHf0 0Q0XPyVxu2ymEPWo/+aNmiYyWmfRi7n9enWx61PgghETrFCfCfvFhAaieA7FyU04SzA2CL nv8SHz05I70FauLp96oAG3jZJUURnK5lm/XrdJjVE6G8ISyi0ayZmdKTho65FGF/JNPlu6 gryzZZwr6sB2xw+oYhR99KEsvOvSrNjaEa0jTo3qB+7cEtfuhRCyKgbMbnGzaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639706881; a=rsa-sha256; cv=none; b=N/uKArIa0dVYSBGXCI28iM9snXBJSkCm3nzg7yEW2mpi7yafbU8WHwUjdQhNpAZ8VxR2Xm 2UHhHLMbgIb3qiIReUziKcuOKMNQN8D9BFFng0hUP6uWjgOBkHY6GCgq+nT2/ugLiCq9nK QvguPfg0iweBRq4mBtAL2JGoUcBDu/32KyPJyTD7t+30iDaEg72GhQt1MbA1MOpBkEfwOM ajOtybimx7LWMWA+6i7rQOfLfqltP5Wge3Wswscm3nESXNhGy9LaTudU4NWArlLikh0fVs RNKMxexX8rA4uwSyj2UMsElHRqGUQXeb+N3Km+yz4OoHvBRnpIMP6K/iiDRYug== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=LhD+WeM3; 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: 1.01 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=LhD+WeM3; 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: E11CD3576A X-Spam-Score: 1.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZQQd9G49VdYr * 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 d117df1e81..e56bccb895 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1054,3 +1054,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) + (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."))) -- 2.32.0