From patchwork Mon Dec 13 06:00:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35188 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 3906E27BBEA; Mon, 13 Dec 2021 06:08:00 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 B292A27BBE9 for ; Mon, 13 Dec 2021 06:07:59 +0000 (GMT) Received: from localhost ([::1]:47344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mweVC-0006aC-TB for patchwork@mira.cbaines.net; Mon, 13 Dec 2021 01:07:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mweSO-0003cZ-2x for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mweSN-0007YQ-Q8 for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mweSN-0002d6-L6 for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v4 27/45] gnu: Add node-openzwave-shared. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Dec 2021 06:05:03 +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.16393754609881 (code B ref 51838); Mon, 13 Dec 2021 06:05:03 +0000 Received: (at 51838) by debbugs.gnu.org; 13 Dec 2021 06:04:20 +0000 Received: from localhost ([127.0.0.1]:53778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweRg-0002ZA-01 for submit@debbugs.gnu.org; Mon, 13 Dec 2021 01:04:20 -0500 Received: from mail-vk1-f179.google.com ([209.85.221.179]:44937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweRb-0002YK-IT for 51838@debbugs.gnu.org; Mon, 13 Dec 2021 01:04:16 -0500 Received: by mail-vk1-f179.google.com with SMTP id u68so9670550vke.11 for <51838@debbugs.gnu.org>; Sun, 12 Dec 2021 22:04:15 -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=HXFMkUR7Pv8RG2WEXK66tg3oqCcv90+SKVcWp5dT+Wc=; b=e9oEESlJuMsWWza3ucZdrgS6+wS5vM5YhjR0hIJ+Wh2sRaXEk6ruB+NHPEYPgYEm4z 0KQEelM1Roe+Qu4t3sTI/R5U8P5JHCk6BPOlkzd6KCnFieZCoG2U+GaJoyPA8LNVink7 AhiRIUnM7CGYqe8hgPfSgKj6s355EZJg4IVRU9wjGoznpjz91pX37sOcopild6OptSEJ 7tTInCaEgWwcbgJhASezBzXpAXyyVPzO3eVkSRd7v4q6aEeEOCO6eMVzl14y4ANLQ99n 7TsR93GIrFDwHl/O3GF5Sgjx7+MmvsG70Y4KxZe7GPwVt+9mcRGYCfGbLqfQT80gwyxS V89A== 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=HXFMkUR7Pv8RG2WEXK66tg3oqCcv90+SKVcWp5dT+Wc=; b=ua2wmh+Q2Axs4QcZEmp8RM/zb7JdAtXyrUrLottHIboRFiy8otBe61YRj8uwK/ctV8 1w1QdKxeLIMupF+CkChg9vwtxIHkN/TS91fHqqx0HSnvxIlERDruWSkJmxogIsdpQf2H zYVR7xrsbCt3wTrUy6CWY7whXVFCxTxWkUek0ujz3CNm80F28T6SdSC91vMypdSBWyUw HEAh6I3EY1H9oR96NYqSzEKynTeOvosykvCOqZ0DGK6dg2+s68UqIF6fiR08oQWpoT5P rp1vHYNWnr/a6NaM2QDPTel2g7XDapfBg08D38YkfKTpxB4YmT6BMqS4bHokauuTGTHW cQDQ== X-Gm-Message-State: AOAM531T8H6D/4QI1IjtWF0VhkPzQFEbYN9Hf0CoAKK1Nrrg+1nIosz3 dkefRiP7YWEVLYChPgBKIke1efqFraE5U/sguxA= X-Google-Smtp-Source: ABdhPJyWhLMRKkS+1bmuEdL94xvSKiRw4C6R9AlHBqyTe5FhU2/NkFZCpIbGpoWu9TBMBhu1m75Egg== X-Received: by 2002:a05:6122:130d:: with SMTP id e13mr30056496vkp.6.1639375450074; Sun, 12 Dec 2021 22:04:10 -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 17sm3937938uaq.10.2021.12.12.22.04.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 22:04:09 -0800 (PST) From: Philip McGrath Date: Mon, 13 Dec 2021 01:00:49 -0500 Message-Id: <20211213060107.129223-28-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211213060107.129223-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-5-philip@philipmcgrath.com> <877dc924h7.fsf@gmx.com> <5c62c3ce-dd50-5dcd-00ed-ff1524be4e0b@philipmcgrath.com> <20211213060107.129223-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/zwave.scm (node-openzwave-shared): New variable. --- gnu/packages/zwave.scm | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/gnu/packages/zwave.scm b/gnu/packages/zwave.scm index 2019ec32df..feecf51e9c 100644 --- a/gnu/packages/zwave.scm +++ b/gnu/packages/zwave.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Ludovic Courtès +;;; Copyright © 2021 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,11 +22,14 @@ (define-module (gnu packages zwave) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system node) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages node-xyz) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages perl) + #:use-module (gnu packages python) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xml)) @@ -88,3 +92,68 @@ (define-public open-zwave and respond to devices on a Z-Wave network, without requiring in-depth knowledge of the Z-Wave protocol.") (license license:lgpl3+))) + +(define-public node-openzwave-shared + (package + (name "node-openzwave-shared") + (version "1.7.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenZWave/node-openzwave-shared") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1bqqy12dzqj05j9wsh50dmn84dddmhz0gjzvd3y20z4hpy1v8rsc")))) + (inputs + `(("open-zwave" ,open-zwave) + ("node-nan" ,node-nan))) + (native-inputs + `(("which" ,which) + ("python" ,python) + ("pkg-config" ,pkg-config))) + (build-system node-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'build + ;; For some reason, `npm install` doesn't build + ;; the addon automatically, so we do it explicitly here. + ;; We go through `npx` so the npmrc file sets the + ;; configuration up properly. + (lambda* (#:key inputs #:allow-other-keys) + (define node-dir + (assoc-ref inputs "node")) + (invoke (string-append node-dir "/bin/npx") + "--call" + (string-append + node-dir + "/lib/node_modules/npm/bin/node-gyp-bin/node-gyp" + " " + "rebuild"))))))) + (home-page "https://github.com/OpenZWave/node-openzwave-shared") + (synopsis "Node.js bindings for OpenZWave") + (description + "With the @code{node-openzwave-shared} package, you can easily control +and manage your Z-Wave devices (lights, dimmers, blinds, you name it) from +within Node.js applications. This library also supports secure +devices (e.g. door locks) that require encryption. All widely used Node.js +versions are supported with the help of @code{node-nan}. + +This library is currently able to: +@itemize @bullet +@item +scan a Z-Wave network and report on connected devices; +@item +write values to Z-Wave nodes; +@item +monitor the network for changes; +@item +heal nodes and/or the network; and +@item +perform management tasks: add or remove nodes, replace failed nodes, +manage their group associations, etc. +@end itemize") + (license license:isc)))