1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages node)
21 #:use-module ((guix licenses)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages perl)
25 #:use-module (gnu packages python)
26 #:use-module (gnu packages gcc)
27 #:use-module (gnu packages linux)
28 #:use-module (gnu packages base)
29 #:use-module (guix packages)
30 #:use-module (guix derivations)
31 #:use-module (guix download)
32 #:use-module (guix build-system gnu))
40 (uri (string-append "http://nodejs.org/dist/v" version
41 "/node-v" version ".tar.gz"))
44 "17gk29zbw58l0sjjfw86acp39pkiblnq0gsq1jdrd70w0pgn8gdj"))))
45 (native-inputs `(("python" ,python-2)
48 ("util-linux" ,util-linux)
50 (build-system gnu-build-system)
55 ;; Node's configure script is actually a python script, so we can't
57 (lambda* (#:key outputs (configure-flags '()) inputs
59 (let* ((prefix (assoc-ref outputs "out"))
60 (flags `(,(string-append "--prefix=" prefix)
62 (format #t "build directory: ~s~%" (getcwd))
63 (format #t "configure flags: ~s~%" flags)
64 ;; Node's configure script expects the CC environment variable to
66 (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
68 (string-append (assoc-ref inputs "python")
70 "./configure" flags))))
72 (synopsis "Evented I/O for V8 JavaScript")
73 (description "Node.js is a platform built on Chrome's JavaScript runtime
74 for easily building fast, scalable network applications. Node.js uses an
75 event-driven, non-blocking I/O model that makes it lightweight and efficient,
76 perfect for data-intensive real-time applications that run across distributed
79 (home-page "http://nodejs.org/")))