From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4BuVABQWsWFlCQAAgWs5BA (envelope-from ) for ; Wed, 08 Dec 2021 21:31:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mB0XOBMWsWGTegAA1q6Kng (envelope-from ) for ; Wed, 08 Dec 2021 20:31:15 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 757A8261E8 for ; Wed, 8 Dec 2021 21:31:15 +0100 (CET) Received: from localhost ([::1]:47736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mv3aq-0000CU-RV for larch@yhetil.org; Wed, 08 Dec 2021 15:31:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mv3a0-0006lc-2y for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:21 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mv3Zy-0000aR-Pq for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mv3Zy-00062h-H8 for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:18 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v3 36/43] gnu: Add node-serialport-bindings. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Dec 2021 20:30:18 +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 Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163899539522903 (code B ref 51838); Wed, 08 Dec 2021 20:30:18 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Dec 2021 20:29:55 +0000 Received: from localhost ([127.0.0.1]:41649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Zb-0005xE-C2 for submit@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:55 -0500 Received: from mail-vk1-f182.google.com ([209.85.221.182]:40510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Z8-0005tv-QK for 51838@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:27 -0500 Received: by mail-vk1-f182.google.com with SMTP id 70so2357451vkx.7 for <51838@debbugs.gnu.org>; Wed, 08 Dec 2021 12:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UDvwQMONhN/F5H1yDlPcjsz1nGLDvlWAq4wI23KTY5E=; b=ScdvYtNWQYBws7VeixMoGogvWsD3k/+Pr21LjuvfU2pX1HjzbZrj+ko8TVnoyhW2pb DZ5njApqNFGKk+fqPyhRMXtaMZ8uFkhgcZMyI9RBKD+knDCLxjGlX0AcvmUZP9gnlRO9 0s13Ww9Kd7KZTLXPT61+Z4I3LtkjOB2c4j16PF692xSZ6tl3vUqbLLo/CdhMCAcS7pBZ FzSDE4UwhWXqzNYMBHrISXNEp2a+hasKUCy4x3eX54k4ieRgOmvkC9uzadYkvyoCWH+L QrAThtlxGAWqggVq1PeiVtQc++1drk6rq/+/mgZK9FyWUsbfzAuxnWDDtNi4c64LtTR7 l5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UDvwQMONhN/F5H1yDlPcjsz1nGLDvlWAq4wI23KTY5E=; b=Wtqa+22hL2+1fxs7ayCH4OvZYtwD/mTXsjL6Pnrn+PfvNLmyWTudVQSRMewxqwXEXf nbaMmXjZ5QoIEyLlOvWC77LY5iGOhkAeDtwY+lPCWnSQAAj5V4Wjb6QJ+HrRCOTs2/4g bsJQ/GoelcxpuKlZQJc+iG/8gx8DN9nE3Agym0EjFqpN3gtEbRgS7dQjeBW0IKxmYz4B g/1f7fS4jpTkGqj70bYbnm+OgKiEsmkhU+gWsmCBh+D/9maXRDwzo6JfruVfQCFHtan9 enKKed5xN/VOfsqaAH5bPBo2/H/rsAidH3FRMuBSxPeWH+O51EaeYk6XiEwUKrtEV7Q8 Gz4g== X-Gm-Message-State: AOAM530aDRTGno9/ueiERb9IITc+E43bWQywfZE6t7BaU74HvbzfEWwY TLZR+iLPYlQ7nREQiNU4wYV5wT+4jWNbeL9Vz0A= X-Google-Smtp-Source: ABdhPJy0CaJgsYrMU5HSgkYtXDuxamYxD3PNvspOPrlRSEKgprHYROe3Epln2w2u/7PITOgvRf2rIg== X-Received: by 2002:a1f:3f4f:: with SMTP id m76mr1239713vka.1.1638995361251; Wed, 08 Dec 2021 12:29: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 f7sm2428672vkm.31.2021.12.08.12.29.20 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Dec 2021 12:29:21 -0800 (PST) From: Philip McGrath Date: Wed, 8 Dec 2021 15:28:31 -0500 Message-Id: <20211208202838.752542-37-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211208202838.752542-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638995475; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=UDvwQMONhN/F5H1yDlPcjsz1nGLDvlWAq4wI23KTY5E=; b=mFqLKjhdBTt4bCw5lX5pqOLHcwS7jTefdDo0u7ZlFBYCV4lJQ5zvMIfxMwcViZ9RuG7cOS OTC+G3b4qcOYynpsVmSwUiuC0YK2tKVwB4aqhARUNP1/+vd4Zmjk2zLae8pRF+ctACTnPJ v74IRp8Bg7VN0RBOY70S9B79+K8JAfSPR7wPtGQ2i6hdtD0PXQn6C2a7+D6dLqIZqO1JDc jBZDCkKggSQPj/mh775n7GspAZRbsE+eemOSMzRpo73wD7yVsEPG/vrzD9u8KDiqLQD4AY l29XAfgHVcftC5NawUirhk2Zo1+huUWwGvcjK3QdfeZo+yHrHSNjlA3CvqhMwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638995475; a=rsa-sha256; cv=none; b=U/yyqLI/pTDTNt0OD4uWGLxxd3ukBTwnVu285TLbLTizxvXsHP97GqAQ52Rvj9lAwLP+pD ZL0/hWjFXw7X7RbG1XZyWLThp1ebT582K3K6ag1jAP5JdwA06+m4ycJ+bjNPxlSRlpJGSJ HRW7NEn5kmPYFNz3F1Wj7LoMAiICGxID96xJozMMsfwB/NJYOfuL2NrYP+U2/RMVGoJR7Z xT4JyTpVRrLjvOSLJbnMsEJ+kBukUQwwTI+mGHSTW+UpAvf3BCTLxVc+1G1fagxrDzgyen IxVMuUccW+QrUPOYU4bQkjvKbpHUFo4Oxc6CZ7JAvbtmfe1oUUEU5POCjDLblw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=ScdvYtNW; 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.45 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=ScdvYtNW; 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: 757A8261E8 X-Spam-Score: -0.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8YPNDuWoTbWi * 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 495fc6f854..a60ec33506 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -970,3 +970,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 + `(("python" ,python))) + (inputs + `(("node-nan" ,node-nan) + ("node-bindings" ,node-bindings) + ("node-serialport-binding-abstract" ,node-serialport-binding-abstract) + ("node-serialport-parser-readline" ,node-serialport-parser-readline))) + (arguments + `(#:absent-dependencies + `("debug" + "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