unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 36599@debbugs.gnu.org, ludo@gnu.org, goodoldpaul@autistici.org
Subject: [bug#36599] [PATCH] gnu: Add node-semver.
Date: Mon, 02 Sep 2019 16:50:28 +0200	[thread overview]
Message-ID: <74DCA7FB-6960-4E6A-8DB5-326E065B5DEB@lepiller.eu> (raw)
In-Reply-To: <87a7bmamnv.fsf@gnu.org>

Le 2 septembre 2019 14:49:08 GMT+02:00, "Ludovic Courtès" <ludo@gnu.org> a écrit :
>Hi Giacomo,
>
>This patch seems to have been forgotten…
>
>Giacomo Leidi <goodoldpaul@autistici.org> skribis:
>
>> * gnu/packages/node.scm (node-semver): New variable.
>
>[...]
>
>> +(define-public node-semver
>> +  (package
>> +    (name "node-semver")
>> +    (version "6.2.0")
>> +    (source (origin
>> +              (method git-fetch)
>> +              (uri (git-reference
>> +                    (url "https://github.com/npm/node-semver.git")
>> +                    (commit (string-append "v" version))))
>> +              (file-name (git-file-name name version))
>> +              (sha256
>> +               (base32
>> +               
>"0lqb0v7frrdr7yvxy8b2yg6rp1jilninzk76qnx5qnswxnr4gj5m"))))
>
>The nice thing is that the source doesn’t contain any binaries (or
>“minified” code),.
>
>> +    (build-system trivial-build-system)
>> +    (propagated-inputs
>> +     `(("node" ,node)))
>> +    (arguments
>> +     '(#:modules ((guix build utils))
>> +       #:builder
>> +       (begin
>> +         (use-modules (guix build utils))
>> +         (let* ((source (assoc-ref %build-inputs "source"))
>> +                (out (assoc-ref %outputs "out"))
>> +                (semver-js "semver.js")
>> +                (entry-point (string-append "bin/" semver-js)))
>> +           (mkdir-p (string-append out "/bin"))
>> +           (setenv "PATH" (string-append (assoc-ref %build-inputs
>> +                                                    "node")
>> +                                         "/bin:" (getenv "PATH")))
>> +           (map (lambda (file)
>> +                  (install-file (string-append source "/" file)
>out))
>> +                (list semver-js "LICENSE" "package.json"
>"package-lock.json" "range.bnf"))
>> +           (install-file (string-append source "/" entry-point)
>> +                         (string-append out "/bin"))
>> +           (patch-shebang (string-append out "/" entry-point))
>> +           #t))))
>
>This installs files in non-standard locations:
>
>--8<---------------cut here---------------start------------->8---
>$ find $(./pre-inst-env guix build node-semver)
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package-lock.json
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/bin/semver.js
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/package.json
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/semver.js
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/range.bnf
>/gnu/store/dmclr4h1jwqp02j9bpp9xsr5pzacdmnl-node-semver-6.2.0/LICENSE
>--8<---------------cut here---------------end--------------->8---
>
>bin/ is fine, though should the binary be called ‘semver’ instead of
>‘semver.js’?
>
>Could you arrange so that ‘LICENSE’ goes to ‘share/doc/node-semver’?
>
>As for the other files, I don’t know.   Are they needed?  Should they
>go
>to share/node-semver?
>
>Thanks in advance, and apologies for the loooong delay!
>
>Ludo’.

Actually we have a node-build-system now which woull work much better than the trivial-build-system.

  reply	other threads:[~2019-09-02 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 12:12 [bug#36599] [PATCH] gnu: Add node-semver Giacomo Leidi
2019-09-02 12:49 ` Ludovic Courtès
2019-09-02 14:50   ` Julien Lepiller [this message]
2019-09-02 17:13     ` goodoldpaul
2020-04-07 23:06 ` [bug#36599] [PATCH] gnu: Add node-semver. (Updated) goodoldpaul
2020-04-09 20:01   ` Efraim Flashner
2020-04-15 15:36     ` goodoldpaul
2020-04-15 17:09       ` Julien Lepiller
2020-04-18 18:39   ` bug#36599: " Efraim Flashner
2020-04-17 14:54 ` [bug#36599] " goodoldpaul
2020-04-17 15:03   ` Efraim Flashner
2020-04-17 16:09   ` 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=74DCA7FB-6960-4E6A-8DB5-326E065B5DEB@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=36599@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    --cc=ludo@gnu.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).