From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:40525) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmHMo-0007aj-VS for guix-patches@gnu.org; Sat, 13 Jul 2019 08:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmHMk-00032M-KU for guix-patches@gnu.org; Sat, 13 Jul 2019 08:43:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmHMk-000329-FG for guix-patches@gnu.org; Sat, 13 Jul 2019 08:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmHMk-0001Ll-AE for guix-patches@gnu.org; Sat, 13 Jul 2019 08:43:02 -0400 Subject: [bug#36602] [PATCH] Add node-build-system. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190711184653.3f6956b8@sybil.lepiller.eu> <87ef2wsa2l.fsf@jlicht.xyz> Date: Sat, 13 Jul 2019 14:42:38 +0200 In-Reply-To: <87ef2wsa2l.fsf@jlicht.xyz> (Jelle Licht's message of "Thu, 11 Jul 2019 20:25:06 +0200") Message-ID: <87a7di9kch.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Jelle Licht Cc: 36602@debbugs.gnu.org Hello! Nice work! I wonder if this could be used for the =E2=80=98node-semver=E2= =80=99 package that arrived at about the same time: . Jelle Licht skribis: >> +(define* (install #:key outputs inputs global? #:allow-other-keys) >> + "Install the node module to the output store item. MODULENAME defines >> +under which name the module will be installed, GLOBAL? determines wheth= er this >> +is an npm global install." >> + (let* ((out (assoc-ref outputs "out")) >> + (src-dir (getcwd)) >> + (tgt-dir (string-append out "/lib")) >> + (bin-dir (string-append out "/bin")) >> + (modulename (string-append (assoc-ref (read-package-data) "= name"))) >> + (data (read-package-data)) >> + (bin-conf (assoc-ref data "bin")) >> + (dependencies (match (assoc-ref data "dependencies") >> + ((@ deps ...) deps) Note that =E2=80=98@=E2=80=99 here matches anything. Did you mean '@, whic= h would match the @ symbol? >> + (#f #f)))) > It might be better to write out most of these > names. I think we could also move `modulename' one line lower, so it can > become `(modulename (assoc-ref data "name"))'. I=E2=80=99m gratuitously nitpicking as well :-), but I think we should spel= l out names in general, so I=E2=80=99d propose s/src-dir/source/, s/tgt-dir/targe= t/, etc. https://www.gnu.org/software/guix/manual/en/html_node/Formatting-Code.html Anyway, thanks for working on it! Ludo=E2=80=99.