From patchwork Fri Dec 17 02:03:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35326 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 E58C827BBEA; Fri, 17 Dec 2021 02:08:06 +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 72B7627BBE9 for ; Fri, 17 Dec 2021 02:08:06 +0000 (GMT) Received: from localhost ([::1]:55770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my2fF-0006vT-Ks for patchwork@mira.cbaines.net; Thu, 16 Dec 2021 21:08:05 -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 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 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.")))