From: "Ludovic Courtès" <ludo@gnu.org>
To: Jelle Licht <jlicht@fsfe.org>
Cc: 36602@debbugs.gnu.org
Subject: [bug#36602] [PATCH] Add node-build-system.
Date: Sat, 13 Jul 2019 14:42:38 +0200 [thread overview]
Message-ID: <87a7di9kch.fsf@gnu.org> (raw)
In-Reply-To: <87ef2wsa2l.fsf@jlicht.xyz> (Jelle Licht's message of "Thu, 11 Jul 2019 20:25:06 +0200")
Hello!
Nice work! I wonder if this could be used for the ‘node-semver’ package
that arrived at about the same time: <https://issues.guix.gnu.org/issue/36599>.
Jelle Licht <jlicht@fsfe.org> 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 whether 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 ‘@’ here matches anything. Did you mean '@, which 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’m gratuitously nitpicking as well :-), but I think we should spell out
names in general, so I’d propose s/src-dir/source/, s/tgt-dir/target/,
etc.
https://www.gnu.org/software/guix/manual/en/html_node/Formatting-Code.html
Anyway, thanks for working on it!
Ludo’.
next prev parent reply other threads:[~2019-07-13 12:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 16:46 [bug#36602] [PATCH] Add node-build-system Julien Lepiller
2019-07-11 18:25 ` Jelle Licht
2019-07-13 12:42 ` Ludovic Courtès [this message]
2019-07-13 20:20 ` Julien Lepiller
2019-07-13 21:30 ` Jelle Licht
2019-07-14 10:34 ` bug#36602: " Julien Lepiller
2019-07-14 12:46 ` [bug#36602] " swedebugia
2019-07-13 15:32 ` goodoldpaul
2019-07-14 11:09 ` [bug#36602] guix/build/json.scm Robert Vollmert
2019-07-14 12:59 ` Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7di9kch.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=36602@debbugs.gnu.org \
--cc=jlicht@fsfe.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).