GNU bug report logs - #36599
[PATCH] gnu: Add node-semver.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Giacomo Leidi <goodoldpaul@HIDDEN>; Keywords: patch; dated Thu, 11 Jul 2019 15:14:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Jul 2019 15:13:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 11 11:13:40 2019
Received: from localhost ([127.0.0.1]:38396 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hlalN-0001Uk-Oe
	for submit <at> debbugs.gnu.org; Thu, 11 Jul 2019 11:13:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:46349)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <goodoldpaul@HIDDEN>) id 1hlXwe-0002n2-Hn
 for submit <at> debbugs.gnu.org; Thu, 11 Jul 2019 08:13:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48761)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <goodoldpaul@HIDDEN>) id 1hlXwd-00067O-8a
 for guix-patches@HIDDEN; Thu, 11 Jul 2019 08:13:04 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <goodoldpaul@HIDDEN>) id 1hlXwa-00017D-0Q
 for guix-patches@HIDDEN; Thu, 11 Jul 2019 08:13:03 -0400
Received: from latitanza.investici.org ([2001:888:2000:56::19]:61039)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <goodoldpaul@HIDDEN>)
 id 1hlXwZ-00010v-2l
 for guix-patches@HIDDEN; Thu, 11 Jul 2019 08:12:59 -0400
Received: from mx1.investici.org (localhost [127.0.0.1])
 by latitanza.investici.org (Postfix) with ESMTP id DF1C41204F7;
 Thu, 11 Jul 2019 12:12:48 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org;
 s=stigmate; t=1562847168;
 bh=J1FKbwTpu6KoMaHGaGzv6s3cP2f7m1BeRoLfmsnmqTI=;
 h=From:To:Cc:Subject:Date:From;
 b=I1aw5TBWUWD2+bAgYLcLEUqx/Pd6YGouUjqAoqSjdL+5lfRbI7Kbok6ooXVCtfQTy
 4sB3EUYl1Lh4SSIvRohbVaUJDIj0uey4gzZiV6U+PNv4HDOlYoJ7O+9yjApKXEnYbg
 E698HY87E+PUHRVRHr3HCls3olnkPjVxmmJQ1wxc=
Received: from [82.94.249.234] (mx1.investici.org [82.94.249.234])
 (Authenticated sender: goodoldpaul@HIDDEN) by localhost (Postfix) with
 ESMTPSA id 949E71204C7; Thu, 11 Jul 2019 12:12:47 +0000 (UTC)
From: Giacomo Leidi <goodoldpaul@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add node-semver.
Date: Thu, 11 Jul 2019 14:12:21 +0200
Message-Id: <20190711121221.16123-1-goodoldpaul@HIDDEN>
X-Mailer: git-send-email 2.22.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2001:888:2000:56::19
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 11 Jul 2019 11:13:36 -0400
Cc: Giacomo Leidi <goodoldpaul@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

* gnu/packages/node.scm (node-semver): New variable.
---
 gnu/packages/node.scm | 48 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index fc43fcb04c..2f3fe17334 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -6,6 +6,7 @@
 ;;; Copyright =C2=A9 2017 Mike Gerwitz <mtg@HIDDEN>
 ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright =C2=A9 2018, 2019 Marius Bakke <mbakke@HIDDEN>
+;;; Copyright =C2=A9 2019 Giacomo Leidi <goodoldpaul@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,10 +24,12 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
=20
 (define-module (gnu packages node)
-  #:use-module ((guix licenses) #:select (expat))
+  #:use-module ((guix licenses) #:select (expat isc))
   #:use-module (guix packages)
   #:use-module (guix derivations)
   #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages adns)
@@ -184,3 +187,46 @@ devices.")
     (home-page "https://nodejs.org/")
     (license expat)
     (properties '((timeout . 3600))))) ; 1 h
+
+(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"))=
))
+    (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.j=
son" "range.bnf"))
+           (install-file (string-append source "/" entry-point)
+                         (string-append out "/bin"))
+           (patch-shebang (string-append out "/" entry-point))
+           #t))))
+    (home-page "https://github.com/npm/node-semver")
+    (synopsis "Parses semantic versions strings")
+    (description
+     "node-semver is a JavaScript implementation of the
+@uref{https://semver.org/, SemVer.org} specification.")
+    (license isc)))
--=20
2.22.0





Acknowledgement sent to Giacomo Leidi <goodoldpaul@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#36599; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 11 Jul 2019 15:15:02 UTC

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