From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 08:05:20 2021 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 To: 51838@debbugs.gnu.org Subject: [PATCH 10/11] gnu: Add node-addon-api. 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-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 51838 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * 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