From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 17:17:55 2022 Received: (at submit) by debbugs.gnu.org; 23 Jun 2022 21:17:55 +0000 Received: from localhost ([127.0.0.1]:40126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4UD5-0007Ov-Dl for submit@debbugs.gnu.org; Thu, 23 Jun 2022 17:17:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:55532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4UD3-0007On-W3 for submit@debbugs.gnu.org; Thu, 23 Jun 2022 17:17:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4UD3-0005GE-Qu for guix-patches@gnu.org; Thu, 23 Jun 2022 17:17:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4UD2-0003yv-Gg; Thu, 23 Jun 2022 17:17:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=LVe+FIDjSAwF3mXiapnnocI04FGGdJGjofSX1NgLkwk=; b=Yg2tDjMd8HSBEWzoGxxp EPJ1JqVlNXUP5J6eBrbd5lWeX/CHNSmDbfXCwVee1kzqPi5F8UYLRsMuTqM8V42LkebwlpPFwNcUd 76Zxj9xIzqFkbUDZmiLPT5RnXSL/RDaZvbvw2Zelrcga71C/dGES2eSjv+JOkTPkO/tcfexh8nqQ8 1yGjyU9F0eWXMch03r9zswHcJZTofQKAaW3AYmLy7AUCNP9TequGmfizHjNwHGiuw4sMvTR+rTKgC LjZddTJsOuGhZjLDKzxKNyKWPDoUP7SEuzEPuQ3o9ms5PclTMzNdrsAuDZdCP2j8zET+mIU5oRnnt 5/GDozQO9nZfYQ==; Received: from host-37-191-236-102.lynet.no ([37.191.236.102]:59636 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4UCz-0006w0-9i; Thu, 23 Jun 2022 17:17:52 -0400 From: Marius Bakke To: Nicolas Graves via Guix-patches via , 55965@debbugs.gnu.org Subject: Re: [bug#55965] [PATCH 8/9] gnu: Add node-crx3. In-Reply-To: <20220614094954.15197-8-ngraves@ngraves.fr> References: <20220614094954.15197-1-ngraves@ngraves.fr> <20220614094954.15197-8-ngraves@ngraves.fr> Date: Thu, 23 Jun 2022 23:17:46 +0200 Message-ID: <87tu8bqdtx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Nicolas Graves 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: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Nicolas Graves via Guix-patches via skriver: > * gnu/packages/node-xyz.scm (node-crx3): New variable. > --- > gnu/packages/node-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm > index 8ec014eee8..79594856f1 100644 > --- a/gnu/packages/node-xyz.scm > +++ b/gnu/packages/node-xyz.scm > @@ -109,6 +109,46 @@ (define-public node-color-name > "This package provides a JSON list with color names and their value= s.") > (license license:expat))) >=20=20 > +(define-public node-crx3 > + (package > + (name "node-crx3") > + (version "1.1.3") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/ahwayakchih/crx3") > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "1snqyw8c3s9p2clhqh1172z0rs1was36sfxkk6acgpar32c2rwzw")))) > + (build-system node-build-system) > + (arguments > + '(#:phases > + (modify-phases %standard-phases > + (delete 'check) > + (add-after 'unpack 'replace-mri-by-minimist > + (lambda _ > + (substitute* "package.json" > + (("\"mri\": \"\\^1.1.6\",") "\"minimist\": \"^1.2.6\",")) Dots should also be escaped, otherwise they match any character. Personally I prefer to have the replacement on a second line for readability but no strong opinion. > + (substitute* "lib/configuration.js" > + (("mri") "minimist")) > + #t)) > + (replace 'configure > + (lambda* (#:key inputs #:allow-other-keys) > + (invoke (string-append (assoc-ref inputs "node") "/bin/npm") > + "--offline" "--ignore-scripts" "install" "--product= ion") > + #t))))) > + (inputs (list node-minimist node-pbf node-yazl)) > + (home-page "https://github.com/ahwayakchih/crx3") > + (synopsis "Create web extension files for Chromium and all other bro= wsers > +supporting the file format and API") Perhaps 'Create CRXv3 browser extensions with JavaScript'? Also, can you add your copyright at the top of the file? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYrTYeg8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHesywEA3EVKBsv7hFVtgVTKOFrSheCfwUyeB3rJXtmm NLFYC7IBAPdLRFZD46SiQxSwvvSM9EDzLcFYyum16Z8UCaMTe6YF =KQH3 -----END PGP SIGNATURE----- --=-=-=--