>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