From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yIWDFU57mGFi0QAAgWs5BA (envelope-from ) for ; Sat, 20 Nov 2021 05:36:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IPQlEU57mGHBRAAAbx9fmQ (envelope-from ) for ; Sat, 20 Nov 2021 04:36:30 +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 D5AD62CB66 for ; Sat, 20 Nov 2021 05:36:29 +0100 (CET) Received: from localhost ([::1]:38740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moI73-0005Lf-1X for larch@yhetil.org; Fri, 19 Nov 2021 23:36:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moI6e-00046B-78 for guix-patches@gnu.org; Fri, 19 Nov 2021 23:36:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moI6c-0007mK-P6 for guix-patches@gnu.org; Fri, 19 Nov 2021 23:36:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moI6c-00081o-Mz; Fri, 19 Nov 2021 23:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v2 25/26] gnu: Add node-addon-api. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 20 Nov 2021 04:36:02 +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: Liliana Marie Prikler X-Debbugs-Original-Xcc: Liliana Marie Prikler Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163738292930787 (code B ref 51838); Sat, 20 Nov 2021 04:36:02 +0000 Received: (at 51838) by debbugs.gnu.org; 20 Nov 2021 04:35:29 +0000 Received: from localhost ([127.0.0.1]:41272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moI65-00080O-7S for submit@debbugs.gnu.org; Fri, 19 Nov 2021 23:35:29 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:38826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moI5E-0007tJ-0B for 51838@debbugs.gnu.org; Fri, 19 Nov 2021 23:34:36 -0500 Received: by mail-qv1-f48.google.com with SMTP id a24so8535739qvb.5 for <51838@debbugs.gnu.org>; Fri, 19 Nov 2021 20:34:35 -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=GOfT5efxp3W1RoTTbqJYi7kpaw3hg0vmi3aqGO2Gvjc=; b=A2qh4WevwlhA8VavqPGECiWD1VhxuTVIX+SOO9jDJSR9CUtXQDhufY7H0cEZuYQvQw WkpUP5kwyfoRUJDuY30qNUAWG8PwJ9T6HXHdt0jNYiYfNnbnl4TIvh0BOgcd5UKzKdrW iyWsH/zoxFsBsBEgaR0Wkfgg0u6y3N9rsrqwBLl6d1ilFikftxYmHSkgIuwTPGHzMh0c buS+oS9zPec0uYChKsIdE7FuWg1CW1GYIuNveRfGWjxoL1Q0gFKBxbBehbyT72KnbQFy Sd9dNJxRZ1Q+r+tTqO7jAneaWffT72q4v6RRxH/o9Q75U1WnclISken9e9c+WJgfokFF iaug== 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=GOfT5efxp3W1RoTTbqJYi7kpaw3hg0vmi3aqGO2Gvjc=; b=UnOdCQQWtoAvJ1FgmLvLL3Acauo/SLEXO5N4k+UYWYwpQKY5YhsX6feRVc0TH6aC2q Xm6eHIKtNlO4b4KHG/sLGHF0QDRXO1SBeEN9R0P0Tm5A2HpvUboY2tzmHEds534r9NBC q9n6bn2HAZk/ZcB8jhdDp+S4wiQbuHvUNTkF4NsWESH2KC5h7jfV4bwkerFFB5QO2tq6 9ZTUNv+bM2+H8CnQcvcUopUwR3+GG55m85vhlMJIaR24p5EQwR26LxS2GEfafF++QRqv bq/SDUYpdm5MCccz4oSo/vWs85TvYdL7NcyRRd0VfDQvCizepEUaLx9gNNLLcSKngI8L GTng== X-Gm-Message-State: AOAM530Cn4kHIZ5v9ztvuz5DZI4fhZZhQxITBgO8VXTnCL6t6g3a0ofp o118n/73WieUU445aaQbNO5xqp8GdMKKZU4V X-Google-Smtp-Source: ABdhPJyke8fmg9SD61EFLJwrxFYmUsj1+owgKkN55uM1aVCl0G6qJGnaAkrvO540VcXcccrtgIGVmQ== X-Received: by 2002:a05:6214:1cc2:: with SMTP id g2mr78979102qvd.56.1637382870616; Fri, 19 Nov 2021 20:34:30 -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 i23sm886364qkl.101.2021.11.19.20.34.30 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Nov 2021 20:34:30 -0800 (PST) From: Philip McGrath Date: Fri, 19 Nov 2021 23:34:05 -0500 Message-Id: <20211120043406.952350-25-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211120043406.952350-1-philip@philipmcgrath.com> References: <5a04aa92-e80d-e11b-235c-b7f5e3a92d00@philipmcgrath.com> <20211120043406.952350-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=1637382990; 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=GOfT5efxp3W1RoTTbqJYi7kpaw3hg0vmi3aqGO2Gvjc=; b=rqywhDdwkLrP9KvS5W76yX9/4J0W92JL4BdBaHVEj1DCPe6kUEfDdrCXuYp87uCzDfoDeA tUUUJZXdbjwcR3KxgVtJhYbvfAEYZ6bZ8Yymfir9W9drbZZoAaT35JjYh76F5xzNAkhlYH 14wMk68ZLwP3ogadEV1CNfbiXekvqgx8ZV5j9Jm8OjGQFZSeQ8JOHBd3O7GS8QkEsw6DeE QYoD9ERhFr7v1S2STus50kJ1b8dRTpRXRaktyP3u+6JiL0F5FWQGG5ddc7ELXyH+Q7XPnI 93atoKHQtKchamoVCKAhc3QLAdjCBwRk06y9FkqvEvguFQCJiym9OLLIB5nZ/w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637382990; a=rsa-sha256; cv=none; b=N+uRjm0g+Pb9n7V0qIHmpQcumU8WWHgTdJ9nmTRpXyNxBs9QzIfbRHVtjBEeBeeF9YkXDZ G1q6eicOIyQauEONOGuKoNoq8guxWDlI34D3cOzoMcfeS1QHzKU1iwkD4FEHek0sTH040O Okz3pLeDBHMEX4taxP5wPYCzdA1lERrEK6V5Oit8wqpjnjyTHd2ZXcq97Jb/GceeNIf8Qo kQbW09rB17m/7kjE4O3wZn2dSiPl/Q/CUZkAiCDEFpDgOPNcmM19HEN55dH18OqpFsW/Im QBNpo2a5HAePW85hOEifJ9KxNCnO8YdHbX5tjps4RDAdhYbuV78bylYX3/QrYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=A2qh4Wev; 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.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=A2qh4Wev; 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: D5AD62CB66 X-Spam-Score: -0.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: k3CKXxKrKb62 * gnu/packages/node-xyz.scm (node-addon-api): New variable. --- gnu/packages/node-xyz.scm | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index ed169c0778..60dbfc163c 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -22,6 +22,9 @@ (define-module (gnu packages node-xyz) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages python) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system node)) @@ -597,3 +600,63 @@ (define-public node-nan This project also contains some helper utilities that make addon development a bit more pleasant.") (license license:expat))) + +(define-public node-addon-api + (package + (name "node-addon-api") + (version "4.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nodejs/node-addon-api") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1bhvfi2m9nxfz418s619914vmidcnrzbjv6l9nid476c3zlpazch")))) + (inputs + `(("python" ,python))) + (build-system node-build-system) + (arguments + `(#:absent-dependencies + `("benchmark" + "bindings" + "clang-format" + "eslint" + "eslint-config-semistandard" + "eslint-config-standard" + "eslint-plugin-import" + "eslint-plugin-node" + "eslint-plugin-promise" + "fs-extra" + "path" + "pre-commit" + "safe-buffer") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-js-tests + ;; We can't run the js-based tests, + ;; but we can still do the C++ parts + (lambda args + (substitute* "package.json" + (("\"test\": \"node test\"") + "\"test\": \"echo stopping after pretest on Guix\""))))))) + (home-page "https://github.com/nodejs/node-addon-api") + (synopsis "Node.js API (Node-API) header-only C++ wrappers") + (description "This module contains header-only C++ wrapper classes which +simplify the use of the C based Node-API provided by Node.js when using C++. +It provides a C++ object model and exception handling semantics with low +overhead. + +Node-API is an ABI stable C interface provided by Node.js for building native +addons. It is intended to insulate native addons from changes in the +underlying JavaScript engine and allow modules compiled for one version to run +on later versions of Node.js without recompilation. The @code{node-addon-api} +module, which is not part of Node.js, preserves the benefits of the Node-API +as it consists only of inline code that depends only on the stable API +provided by Node-API. + +It is important to remember that @emph{other} Node.js interfaces such as +@code{libuv} (included in a project via @code{#include }) are not +ABI-stable across Node.js major versions.") + (license license:expat))) -- 2.32.0