From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Re: Packaging async and underscore Date: Fri, 30 Nov 2018 17:44:53 +0100 Message-ID: References: <70F182DB-C157-4763-A4C6-89985545661C@lepiller.eu> <0e5afb2d-c182-6be4-ba2d-6a6f7dd45ac9@riseup.net> <1150DF84-4952-4401-A8D0-3E05A4D0EB74@lepiller.eu> <23f36a0d-a5ef-5457-1d8e-61fbebda91c4@riseup.net> <87zhu3b41w.fsf@gnu.org> <87va4qxf8e.fsf@posteo.net> <62a1a976-ed2f-a68d-0aa8-d6fb6bd46c14@riseup.net> <8684f18c-af86-4b67-9b54-fe5d755cde14@riseup.net> <457c8004267eef9c76f22457ae45fde8@lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------FF6EEF8A3CFF690827FB1CA3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSloe-0002SR-5v for guix-devel@gnu.org; Fri, 30 Nov 2018 11:38:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSloa-0006pO-PL for guix-devel@gnu.org; Fri, 30 Nov 2018 11:38:56 -0500 Received: from mx1.riseup.net ([198.252.153.129]:60530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gSloZ-0006oa-IG for guix-devel@gnu.org; Fri, 30 Nov 2018 11:38:52 -0500 In-Reply-To: <457c8004267eef9c76f22457ae45fde8@lepiller.eu> Content-Language: en-US List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org, Julien Lepiller This is a multi-part message in MIME format. --------------FF6EEF8A3CFF690827FB1CA3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi :) On 2018-11-30 17:08, Julien Lepiller wrote: > Le 2018-11-30 15:17, swedebugia a =C3=A9crit=C2=A0: snip >=20 > Thanks, I'll merge that with my version of the patches, and send them=20 > both for review. I think they are already very good, unless you think w= e=20 > need more time to make sure the build system is perfect. Sounds good to me :) We can improve it further in-tree. > Could you explain why this is necessary? In what case does this=20 > directory doesn't exist? I also wonder if it can be the case that=20 > node_modules is a file or a symlink that isn't catched by your check... The following patch triggers the error. I build it again today and saw=20 that my fix seemed not to work anymore for some reason I do not=20 understand :-/ See this error log: https://paste.debian.net/1053871/. --=20 Cheers Swedebugia --------------FF6EEF8A3CFF690827FB1CA3 Content-Type: text/x-patch; name="0001-gnu-Add-node-underscore.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-Add-node-underscore.patch" >From cdfbaa7c882a810756ec34ad3a4f885960c8a970 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Fri, 30 Nov 2018 17:30:50 +0100 Subject: [PATCH] gnu: Add node-underscore * gnu/packages/node.scm(node-underscore): New variable --- gnu/packages/node.scm | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 70bbb1779..580071fb1 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -22,6 +22,10 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . +;; The node-build-system allows two ways to install node: +;; Locally and globally. Default is "local". +;; See https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/ + (define-module (gnu packages node) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -38,6 +42,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) + #:use-module (gnu packages lisp) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -547,3 +552,45 @@ commonjs, browser, AMD, electron, etc.") (home-page "https://github.com/kumavis/browser-stdout") (license license:expat))) + +(define-public node-underscore + (package + (name "node-underscore") + (version "1.9.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jashkenas/underscore") + (commit "ae037f7c41323807ae6f1533c45512e6d31a1574"))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "1f75wrln5kv5ihkbb9zwhyjqd9imwil801abhv36w09dkkabpjy5")))) + (build-system node-build-system) + (native-inputs `(("uglify-js" ,uglify-js))) + (arguments + `(#:tests? #f + ;; FIXME: These test dependencies are missing: + ;; "karma": "^0.13.13", + ;; "karma-qunit": "~2.0.1", + ;; "karma-sauce-launcher": "^1.2.0", + ;; "nyc": "^2.1.3", + ;; "qunit-cli": "~0.2.0", + ;; "qunit": "^2.6.0", + #:phases ;No configure script + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-files + (lambda* (#:key inputs #:allow-other-keys) + ;; Fix wrong path to uglify-js + (substitute* "package.json" + (("uglifyjs") "uglify-js"))))))) + (synopsis + "JavaScript's functional programming helper library.") + (description + "Underscore.js is a utility-belt library for JavaScript that provides +support for the usual functional suspects (each, map, reduce, filter...) +providing over 100 functions.") + (home-page "http://underscorejs.org") + (license license:expat))) -- 2.19.1 --------------FF6EEF8A3CFF690827FB1CA3--