| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages node)
|
| 22 | #:use-module ((guix licenses) #:select (expat))
|
| 23 | #:use-module (guix packages)
|
| 24 | #:use-module (guix derivations)
|
| 25 | #:use-module (guix download)
|
| 26 | #:use-module (guix build-system gnu)
|
| 27 | #:use-module (gnu packages base)
|
| 28 | #:use-module (gnu packages compression)
|
| 29 | #:use-module (gnu packages gcc)
|
| 30 | #:use-module (gnu packages libevent)
|
| 31 | #:use-module (gnu packages linux)
|
| 32 | #:use-module (gnu packages perl)
|
| 33 | #:use-module (gnu packages python)
|
| 34 | #:use-module (gnu packages tls))
|
| 35 |
|
| 36 | (define-public node
|
| 37 | (package
|
| 38 | (name "node")
|
| 39 | (version "0.12.7")
|
| 40 | (source (origin
|
| 41 | (method url-fetch)
|
| 42 | (uri (string-append "http://nodejs.org/dist/v" version
|
| 43 | "/node-v" version ".tar.gz"))
|
| 44 | (sha256
|
| 45 | (base32
|
| 46 | "17gk29zbw58l0sjjfw86acp39pkiblnq0gsq1jdrd70w0pgn8gdj"))))
|
| 47 | (build-system gnu-build-system)
|
| 48 | (arguments
|
| 49 | |
| 50 | '(#:configure-flags '("--shared-openssl" "--shared-zlib" "--shared-libuv")
|
| 51 | #:phases
|
| 52 | (modify-phases %standard-phases
|
| 53 | (replace 'configure
|
| 54 | |
| 55 | |
| 56 | (lambda* (#:key outputs (configure-flags '()) inputs
|
| 57 | #:allow-other-keys)
|
| 58 | (let* ((prefix (assoc-ref outputs "out"))
|
| 59 | (flags (cons (string-append "--prefix=" prefix)
|
| 60 | configure-flags)))
|
| 61 | (format #t "build directory: ~s~%" (getcwd))
|
| 62 | (format #t "configure flags: ~s~%" flags)
|
| 63 | |
| 64 | |
| 65 | (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
|
| 66 | (zero? (apply system*
|
| 67 | (string-append (assoc-ref inputs "python")
|
| 68 | "/bin/python")
|
| 69 | "./configure" flags))))))))
|
| 70 | (native-inputs
|
| 71 | `(("python" ,python-2)
|
| 72 | ("perl" ,perl)
|
| 73 | ("gcc" ,gcc-4.9)
|
| 74 | ("util-linux" ,util-linux)
|
| 75 | ("which" ,which)))
|
| 76 | (inputs
|
| 77 | `(("libuv" ,libuv)
|
| 78 | ("openssl" ,openssl)
|
| 79 | ("zlib" ,zlib)))
|
| 80 | (synopsis "Evented I/O for V8 JavaScript")
|
| 81 | (description "Node.js is a platform built on Chrome's JavaScript runtime
|
| 82 | for easily building fast, scalable network applications. Node.js uses an
|
| 83 | event-driven, non-blocking I/O model that makes it lightweight and efficient,
|
| 84 | perfect for data-intensive real-time applications that run across distributed
|
| 85 | devices.")
|
| 86 | (home-page "http://nodejs.org/")
|
| 87 | (license expat)))
|