From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Schenkel Subject: [PATCH] gnu: Add node. Date: Tue, 01 Jul 2014 00:20:24 +0200 Message-ID: <87oaxaghuf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1jwY-0004iA-Hl for guix-devel@gnu.org; Mon, 30 Jun 2014 18:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1jwW-00043N-VF for guix-devel@gnu.org; Mon, 30 Jun 2014 18:20:58 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:64866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1jwW-00043D-KH for guix-devel@gnu.org; Mon, 30 Jun 2014 18:20:56 -0400 Received: by mail-wi0-f174.google.com with SMTP id bs8so6826787wib.7 for ; Mon, 30 Jun 2014 15:20:55 -0700 (PDT) Received: from SIRIUS09 ([2a02:1205:5016:3160:beae:c5ff:fe67:f79a]) by mx.google.com with ESMTPSA id ub8sm36028588wib.0.2014.06.30.15.20.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 30 Jun 2014 15:20:54 -0700 (PDT) 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel >From 3ac30b57db1e57e1c80077df7ee645838deb04fd Mon Sep 17 00:00:00 2001 From: Cyrill Schenkel Date: Tue, 1 Jul 2014 00:18:41 +0200 Subject: [PATCH] gnu: Add node. * gnu-system.am (GNU_SYSTEM_MODULES, dist_patch_DATA): Add new patch and pa= ckage. * gnu/packages/patches/node-configure.patch: New file. * gnu/packages/node.scm: New file. --- gnu-system.am | 2 ++ gnu/packages/node.scm | 56 +++++++++++++++++++++++++++= ++++ gnu/packages/patches/node-configure.patch | 34 +++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 gnu/packages/node.scm create mode 100644 gnu/packages/patches/node-configure.patch diff --git a/gnu-system.am b/gnu-system.am index 793ee4c..c38896b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -171,6 +171,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/ncurses.scm \ gnu/packages/netpbm.scm \ gnu/packages/nettle.scm \ + gnu/packages/node.scm \ gnu/packages/noweb.scm \ gnu/packages/ocaml.scm \ gnu/packages/ocrad.scm \ @@ -339,6 +340,7 @@ dist_patch_DATA =3D \ gnu/packages/patches/mit-krb5-init-fix.patch \ gnu/packages/patches/mpc123-initialize-ao.patch \ gnu/packages/patches/module-init-tools-moduledir.patch \ + gnu/packages/patches/node-configure.patch \ gnu/packages/patches/patchelf-page-size.patch \ gnu/packages/patches/patchutils-xfail-gendiff-tests.patch \ gnu/packages/patches/perl-no-sys-dirs.patch \ diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm new file mode 100644 index 0000000..be7afa6 --- /dev/null +++ b/gnu/packages/node.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2014 Cyrill Schenkel +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages node) + #:use-module ((guix licenses) + #:select (expat)) + #:use-module (gnu packages) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) + #:use-module (gnu packages gcc) + #:use-module (gnu packages linux) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build gnu-build-system) + #:use-module (guix build-system gnu)) + +(define-public node + (package + (name "node") + (version "0.10.29") + (source (origin + (method url-fetch) + (uri (string-append "http://nodejs.org/dist/v" version + "/node-v" version ".tar.gz")) + (sha256 + (base32 + "0pdib215ldypc149ad03wlfj0i8fwdfydd4q2hd7ry35yw0rsds7")) + (patches (list (search-patch "node-configure.patch"))))) + (native-inputs `(("python" ,python-2) + ("perl" ,perl) + ("gcc" ,gcc-4.9) + ("util-linux" ,util-linux))) + (build-system gnu-build-system) + (synopsis "Evented I/O for V8 javascript.") + (description "Node.js is a platform built on Chrome's JavaScript runti= me +for easily building fast, scalable network applications. Node.js uses an +event-driven, non-blocking I/O model that makes it lightweight and efficie= nt, +perfect for data-intensive real-time applications that run across distribu= ted +devices.") + (license expat) + (home-page "http://nodejs.org/"))) diff --git a/gnu/packages/patches/node-configure.patch b/gnu/packages/patch= es/node-configure.patch new file mode 100644 index 0000000..6351766 --- /dev/null +++ b/gnu/packages/patches/node-configure.patch @@ -0,0 +1,34 @@ +By default the `gnu-build-system' tries to run the configure script with +bash. This doesn't work because the node configure script is written in +python. + +This patch is a small hack which redirects the original content of the +configure script to python in a bash compatible manner. + +--- node-v0.10.29/configure.orig 2014-06-09 19:04:36.000000000 +0200 ++++ node-v0.10.29/configure 2014-06-30 21:56:40.044559261 +0200 +@@ -1,4 +1,18 @@ +-#!/usr/bin/env python ++#!/bin/bash ++ ++ARGS=3D"" ++ ++for i in $@ ++do ++ if echo $i | grep "\\-\\-prefix.*" > /dev/null ++ then ++ ARGS=3D"$ARGS $i" ++ fi ++done ++ ++export CC=3Dgcc ++ ++python <