GNU bug report logs - #36602
[PATCH] Add node-build-system.

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Thu, 11 Jul 2019 16:48:01 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 36602 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Jelle Licht <jlicht <at> fsfe.org>, 36602 <at> debbugs.gnu.org
Subject: Re: [bug#36602] [PATCH] Add node-build-system.
Date: Sat, 13 Jul 2019 22:20:14 +0200
[Message part 1 (text/plain, inline)]
Le Sat, 13 Jul 2019 14:42:38 +0200,
Ludovic Courtès <ludo <at> gnu.org> a écrit :

> 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 <at> 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’.

Hopefully, the attached patch fixes your (and Jelle's) points. I also
fixed the default node package (it was node-lts, but that doesn't exist
anymore), made the configure phase return #t and fixed the
binary-configuration. I tested again on a few packages and they built
without issue.
[0001-build-Add-node-build-system.patch (text/x-patch, attachment)]

This bug report was last modified 5 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.