From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eNiiFv8JkWHtYwAAgWs5BA (envelope-from ) for ; Sun, 14 Nov 2021 14:07:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sBtUEv8JkWFEFwAA1q6Kng (envelope-from ) for ; Sun, 14 Nov 2021 13:07:11 +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 226073C21A for ; Sun, 14 Nov 2021 14:07:11 +0100 (CET) Received: from localhost ([::1]:54034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmFDy-000483-Bz for larch@yhetil.org; Sun, 14 Nov 2021 08:07:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmFCw-0002uV-Cf for guix-patches@gnu.org; Sun, 14 Nov 2021 08:06:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmFCu-0002ID-Fh for guix-patches@gnu.org; Sun, 14 Nov 2021 08:06:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmFCu-000535-An for guix-patches@gnu.org; Sun, 14 Nov 2021 08:06:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH 10/11] gnu: Add node-addon-api. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Nov 2021 13:06: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: Philip McGrath Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163689512019300 (code B ref 51838); Sun, 14 Nov 2021 13:06:04 +0000 Received: (at 51838) by debbugs.gnu.org; 14 Nov 2021 13:05:20 +0000 Received: from localhost ([127.0.0.1]:49427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmFCB-00051D-Vt for submit@debbugs.gnu.org; Sun, 14 Nov 2021 08:05:20 -0500 Received: from mail-qk1-f175.google.com ([209.85.222.175]:40951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmFC4-0004zj-0e for 51838@debbugs.gnu.org; Sun, 14 Nov 2021 08:05:12 -0500 Received: by mail-qk1-f175.google.com with SMTP id p4so5493268qkm.7 for <51838@debbugs.gnu.org>; Sun, 14 Nov 2021 05:05:12 -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=SXzQQq6uVWKvPzgJSFx8iSTsMZUBZgTO2S/Hj22t5tU=; b=ABgP2V2Eo10i71tP28TLL2AghvSj3yA0eee+b1rJXX7gWG4t9VMxKZHOslkqylI1DJ Icv6QXfHaXHa+jcNpw/dAU6u3rwNaRDFIP3qb5XO9hTLcLQcM1sRJtb8SapJol7/spKo 8ldKINWYZd1dtY1ntR2L0keoCeJXiXqclbyCtJ0LN6I+MM9OyRVhyo5PYfT//tPIZPmf hXA+/7yTGPXZmZLLvFNjkHVZVnYAAzJ3rfROiNHw078lKUN+QgL9tmpFtYgYsVgb+Oh2 91UQZS03N4P6H/ysr8O+rhJ9aiEufdFR7oIG1po7f9f2T/3iStufvMxWb58bGeW09tXG y6DA== 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=SXzQQq6uVWKvPzgJSFx8iSTsMZUBZgTO2S/Hj22t5tU=; b=Dps+TI+yg0ERNFdo9S6vjmmYRaQ67yRF3hsO7fAEKqCOiyEHWChTGRUPus9JwDFNX8 bzQnSUhlnskIUVM7WQ+eESqGXm0tZuaWMI66TJkSTMUdeXTjB8PH19v7Au0dfWmRMSBN CGMFFpVbM4+OW1QgGz13yTTY0VP1iFCzK+Zfb/BDNd5ppmQ+AH3VTGL2o8EadYePHOpP dEICpFg0/v4rb8tdJqql83+v4MuA1pfeMycepOMUO0mfeAAYlGe4Amks0gvY9iG7UvtV GtBsVSEEU4JHa5LglUMXImqzZGe+hlsiOhSKolw/ZYJjQdu/uBI+WFUQNA+XCKIkr0Bs 6NUQ== X-Gm-Message-State: AOAM5322q2PFp32iAoDhf5VIS6jGC5Votle8568OCdINhEicT1PDZKCE wyGWQ9o88n3FBZe7hnq9vKhUfYbJt1XAh6hV X-Google-Smtp-Source: ABdhPJzD+wz+2zAtfEg3ndj3T8oykT48Nvt50mKCmWRNgvA8g5D9NpNH35mGtI50Ts8a2cXG8/xDDA== X-Received: by 2002:a05:620a:710:: with SMTP id 16mr23895161qkc.379.1636895106401; Sun, 14 Nov 2021 05:05:06 -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 x10sm5205812qkn.41.2021.11.14.05.05.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Nov 2021 05:05:06 -0800 (PST) From: Philip McGrath Date: Sun, 14 Nov 2021 08:04:08 -0500 Message-Id: <20211114130409.49241-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211114130409.49241-1-philip@philipmcgrath.com> References: <20211114125830.45427-1-philip@philipmcgrath.com> <20211114130409.49241-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=1636895231; 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=SXzQQq6uVWKvPzgJSFx8iSTsMZUBZgTO2S/Hj22t5tU=; b=Twt8TMZuXavll4ptxbroVbzW/cnKFkw1xZnCLpahmDa/XLOnap5QVXBerujsS+RS212esQ 3Ps71yIM1YYqT4PeEA0p+PFhvgvUiMUbI2rOwQOdengyZiD09ckEAWF6Z2FTHW61L2H6eF XhVfyphcbg4OknNcYg1mTulQ2xQmmUMJ1WJNVn5LwF5xirAZoppCgEk1Ds0yIsK1jpNbHI DtyQr2bmWuY7rjr6Njlbv6/JkXgAeWcjKF/m2kDHXup8ms7eesNr8ST+/zTAsWnzxjxjOI uq7ClgHGcUCb07uXD8v1FPxQTvRQw2erGkqN97h7lYAelVe7PRxhmiqhl+X6iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636895231; a=rsa-sha256; cv=none; b=tQX2RknrryB4o/+rmnBlh43kFH9SWEdNIfDRui/YzZ2zNkupVhmteKFwBVBD8raOzOSNV+ k/2mnwDnaG1vpCK2D18f8RY71yO8RbfuEXX/H+T2c4Ohuqq0KZcBrjshaqaflZfH//tDPS F6+EXxRCPm2c/tWccgi8uiHtQfGJLKTZnKbHBH3pCiF6FQgY6gCYn8WW9Kl+ZX0xq3lZHd Y2IAEtKBmLthfjtRN+LpI9BP+fxD/mHT3quX3YQxafdPS4o8pkC1aMMNcyR9ZTpMJZjlVK jDW03OLjyZ3QXsOfcfldyEh355x+UMtbvKfZ4m8yltWZq3Xz6FRCuyA/4vNtEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=ABgP2V2E; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=ABgP2V2E; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 226073C21A X-Spam-Score: 3.16 X-Migadu-Scanner: scn1.migadu.com X-TUID: w5OQItvSjXoO * gnu/packages/node-xyz.scm (node-addon-api): New variable. --- gnu/packages/node-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 29ad14f810..8aa93122df 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -590,3 +590,49 @@ (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")))) + (build-system node-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Ignore numerous missing devDependencies: + (delete 'configure) + (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