mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 15:56:50 +01:00
Merge branch 'node-update'
This branch updates node to 0.10.8, as well as updating its dependencies. It also updates node-packages to use the new style generated by npm2nix (some packages may have been lost in the switch, please check!). Note that 0.10 had some backwards-compatability breaks with 0.8, particularly for readable streams. Please see the official documentation for migration help. Note that I have not yet tested this on darwin (node.js was already broken there), but will do so soon and fix it if it's broken. Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
commit
b385fea5fc
12 changed files with 2134 additions and 1982 deletions
|
@ -1,5 +1,5 @@
|
|||
{stdenv, subversion, sshSupport ? false, openssh ? null}:
|
||||
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false}:
|
||||
{stdenv, subversion, sshSupport ? false, openssh ? null}:
|
||||
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false, name ? null}:
|
||||
|
||||
let
|
||||
repoName = with stdenv.lib;
|
||||
|
@ -18,10 +18,12 @@ let
|
|||
else if snd path == "tags" then "${trd path}-${fst path}"
|
||||
# ../repo (no trunk) -> repo
|
||||
else fst path;
|
||||
|
||||
name_ = if name == null then "${repoName}-r${toString rev}" else name;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${repoName}-r${toString rev}";
|
||||
name = name_;
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [subversion];
|
||||
|
||||
|
|
20
pkgs/development/libraries/c-ares/default.nix
Normal file
20
pkgs/development/libraries/c-ares/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "c-ares-1.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://c-ares.haxx.se/download/${name}.tar.gz";
|
||||
sha256 = "1nyka87yf2jfd0y6sspll0yxwb8zi7kyvajrdbjmh4axc5s1cw1x";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A C library for asynchronous DNS requests";
|
||||
|
||||
homepage = http://c-ares.haxx.se;
|
||||
|
||||
license = stdenv.lib.licenses.mit;
|
||||
|
||||
maintainer = [ stdenv.lib.maintainers.shlevy ];
|
||||
};
|
||||
}
|
30
pkgs/development/libraries/http_parser/build-shared.patch
Normal file
30
pkgs/development/libraries/http_parser/build-shared.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
diff -Naur http-parser-2.1-orig/http_parser.gyp http-parser-2.1/http_parser.gyp
|
||||
--- http-parser-2.1-orig/http_parser.gyp 2013-03-26 18:35:20.000000000 -0400
|
||||
+++ http-parser-2.1/http_parser.gyp 2013-05-23 16:47:49.280488341 -0400
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
'Release': {
|
||||
'defines': [ 'NDEBUG' ],
|
||||
- 'cflags': [ '-Wall', '-Wextra', '-O3' ],
|
||||
+ 'cflags': [ '-Wall', '-Wextra', '-O3', '-fPIC' ],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
'RuntimeLibrary': 0, # static release
|
||||
@@ -50,7 +50,7 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'http_parser',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'shared_library',
|
||||
'include_dirs': [ '.' ],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [ 'HTTP_PARSER_STRICT=0' ],
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
{
|
||||
'target_name': 'http_parser_strict',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'shared_library',
|
||||
'include_dirs': [ '.' ],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [ 'HTTP_PARSER_STRICT=1' ],
|
45
pkgs/development/libraries/http_parser/default.nix
Normal file
45
pkgs/development/libraries/http_parser/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ stdenv, fetchurl, gyp, utillinux ? null }:
|
||||
|
||||
let
|
||||
version = "2.1";
|
||||
in stdenv.mkDerivation {
|
||||
name = "http-parser-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/joyent/http-parser/archive/v${version}.tar.gz";
|
||||
sha256 = "16a2w5z4g2bma25fqcrkpidqzlq8a2jxkk93ajl721q85406j105";
|
||||
};
|
||||
|
||||
patches = [ ./build-shared.patch ];
|
||||
|
||||
configurePhase = "gyp -f make --depth=`pwd` http_parser.gyp";
|
||||
|
||||
buildFlags = [ "BUILDTYPE=Release" ];
|
||||
|
||||
buildInputs = [ gyp utillinux ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
out/Release/test-nonstrict
|
||||
out/Release/test-strict
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv out/Release/lib.target $out/lib
|
||||
|
||||
mkdir -p $out/include
|
||||
mv http_parser.h $out/include
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An HTTP message parser written in C";
|
||||
|
||||
homepage = https://github.com/joyent/http-parser;
|
||||
|
||||
license = stdenv.lib.licenses.mit;
|
||||
|
||||
maintainer = [ stdenv.lib.maintainers.shlevy ];
|
||||
};
|
||||
}
|
|
@ -5,18 +5,22 @@ assert readline != null;
|
|||
let
|
||||
system = stdenv.system;
|
||||
arch = if system == "i686-linux" then "ia32" else if system == "x86_64-linux" || system == "x86_64-darwin" then "x64" else "";
|
||||
version = "3.11.10.22";
|
||||
version = "3.14.5.9";
|
||||
in
|
||||
|
||||
assert arch != "";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
name = "v8-${version}";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://v8.googlecode.com/svn/tags/${version}";
|
||||
sha256 = "1bm3hg4pa17xvs8s895bwklxpaihl3f3vzghdg55s1wd0y4dj96j";
|
||||
sha256 = "18qp5qp5xrb6f00w01cklz358yrl54pks963f5rwvwz82d8sfyqr";
|
||||
name = "v8-${version}-src";
|
||||
};
|
||||
|
||||
patches = [ ./fix-GetLocalizedMessage-usage.patch ];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir build/gyp
|
||||
ln -sv ${gyp}/bin/gyp build/gyp/gyp
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
From dbe142c4eda0f15fad9fa85743dd11b81292fa8f Mon Sep 17 00:00:00 2001
|
||||
From: Timothy J Fontaine <tjfontaine@gmail.com>
|
||||
Date: Thu, 23 May 2013 13:57:59 -0700
|
||||
Subject: [PATCH] v8: fix GetLocalizedMessage usage
|
||||
|
||||
As is the backport of the abort on uncaught exception wouldn't compile
|
||||
because we it was passing in `this` when it was unnecessary.
|
||||
---
|
||||
deps/v8/src/isolate.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/isolate.cc b/src/isolate.cc
|
||||
index 04a438b..5a5293e 100644
|
||||
--- a/src/isolate.cc
|
||||
+++ b/src/isolate.cc
|
||||
@@ -1161,7 +1161,7 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
|
||||
(report_exception || can_be_caught_externally)) {
|
||||
fatal_exception_depth++;
|
||||
fprintf(stderr, "%s\n\nFROM\n",
|
||||
- *MessageHandler::GetLocalizedMessage(this, message_obj));
|
||||
+ *MessageHandler::GetLocalizedMessage(message_obj));
|
||||
PrintCurrentStackTrace(stderr);
|
||||
OS::Abort();
|
||||
}
|
||||
--
|
||||
1.8.1.6
|
||||
|
|
@ -1,54 +1,45 @@
|
|||
{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux }:
|
||||
{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http_parser, c-ares }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.8.23";
|
||||
let
|
||||
version = "0.10.8";
|
||||
|
||||
# !!! Should we also do shared libuv?
|
||||
deps = {
|
||||
inherit v8 openssl zlib;
|
||||
cares = c-ares;
|
||||
http-parser = http_parser;
|
||||
};
|
||||
|
||||
sharedConfigureFlags = name: [
|
||||
"--shared-${name}"
|
||||
"--shared-${name}-includes=${builtins.getAttr name deps}/include"
|
||||
"--shared-${name}-libpath=${builtins.getAttr name deps}/lib"
|
||||
];
|
||||
|
||||
inherit (stdenv.lib) concatMap optional maintainers licenses platforms;
|
||||
in stdenv.mkDerivation {
|
||||
name = "nodejs-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
|
||||
sha256 = "17gdvv0q95v5dn9mbwrm3pxcchfgmlwa7pamwsam9hpdi9ik491q";
|
||||
sha256 = "0m43y7ipd6d89dl97nvrwkx1zss3fdb9835509dyziycr1kggxpd";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--openssl-includes=${openssl}/include"
|
||||
"--openssl-libpath=${openssl}/lib"
|
||||
]
|
||||
++ (if !stdenv.isDarwin then [ # Shared V8 is broken on Mac OS X. Who can fix V8 on Darwin makes me very happy, but I gave up studying python-gyp.
|
||||
"--shared-v8"
|
||||
"--shared-v8-includes=${v8}/includes"
|
||||
"--shared-v8-libpath=${v8}/lib"
|
||||
] else []);
|
||||
|
||||
#patches = stdenv.lib.optional stdenv.isDarwin ./no-arch-flag.patch;
|
||||
|
||||
# Expose the host compiler on darwin, which is the only compiler capable of building it
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export OLDPATH=$PATH
|
||||
export PATH=/usr/bin:$PATH
|
||||
'';
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps);
|
||||
|
||||
prePatch = ''
|
||||
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i tools/{*.py,waf-light,node-waf} configure
|
||||
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
|
||||
'';
|
||||
|
||||
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export PATH=$OLDPATH
|
||||
'' + ''
|
||||
sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
|
||||
'' /*+ stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
|
||||
''*/;
|
||||
|
||||
buildInputs = [ python openssl zlib ]
|
||||
++ stdenv.lib.optional stdenv.isLinux utillinux
|
||||
++ stdenv.lib.optional (!stdenv.isDarwin) v8;
|
||||
buildInputs = [ python ]
|
||||
++ optional stdenv.isLinux utillinux;
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = {
|
||||
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
||||
homepage = http://nodejs.org;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.goibhniu ];
|
||||
maintainers = [ maintainers.goibhniu maintainers.shlevy ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
diff -Naur node-v0.6.10-orig/wscript node-v0.6.10/wscript
|
||||
--- node-v0.6.10-orig/wscript 2012-02-02 19:56:42.000000000 -0500
|
||||
+++ node-v0.6.10/wscript 2012-02-25 14:18:50.000000000 -0500
|
||||
@@ -443,17 +443,6 @@
|
||||
if sys.platform.startswith("darwin"):
|
||||
# used by platform_darwin_*.cc
|
||||
conf.env.append_value('LINKFLAGS', ['-framework','Carbon'])
|
||||
- # cross compile for architecture specified by DEST_CPU
|
||||
- if 'DEST_CPU' in conf.env:
|
||||
- arch = conf.env['DEST_CPU']
|
||||
- # map supported_archs to GCC names:
|
||||
- arch_mappings = {'ia32': 'i386', 'x64': 'x86_64'}
|
||||
- if arch in arch_mappings:
|
||||
- arch = arch_mappings[arch]
|
||||
- flags = ['-arch', arch]
|
||||
- conf.env.append_value('CCFLAGS', flags)
|
||||
- conf.env.append_value('CXXFLAGS', flags)
|
||||
- conf.env.append_value('LINKFLAGS', flags)
|
||||
if 'DEST_CPU' in conf.env:
|
||||
arch = conf.env['DEST_CPU']
|
||||
# TODO: -m32 is only available on 64 bit machines, so check host type
|
|
@ -3558,6 +3558,8 @@ let
|
|||
|
||||
bwidget = callPackage ../development/libraries/bwidget { };
|
||||
|
||||
c-ares = callPackage ../development/libraries/c-ares { };
|
||||
|
||||
caelum = callPackage ../development/libraries/caelum { };
|
||||
|
||||
scmccid = callPackage ../development/libraries/scmccid { };
|
||||
|
@ -4081,6 +4083,8 @@ let
|
|||
|
||||
hsqldb = callPackage ../development/libraries/java/hsqldb { };
|
||||
|
||||
http_parser = callPackage ../development/libraries/http_parser { inherit (pythonPackages) gyp; };
|
||||
|
||||
hunspell = callPackage ../development/libraries/hunspell { };
|
||||
|
||||
hwloc = callPackage ../development/libraries/hwloc {
|
||||
|
|
1894
pkgs/top-level/node-packages-generated.nix
Normal file
1894
pkgs/top-level/node-packages-generated.nix
Normal file
File diff suppressed because it is too large
Load diff
35
pkgs/top-level/node-packages.json
Normal file
35
pkgs/top-level/node-packages.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
[
|
||||
{ "name": "async" }
|
||||
, { "name": "assert" }
|
||||
, { "name": "mocha" }
|
||||
, { "name": "jayschema" }
|
||||
, { "name": "underscore" }
|
||||
, { "name": "extend" }
|
||||
, { "name": "express" }
|
||||
, { "name": "s3http" }
|
||||
, { "name": "aws-sdk" }
|
||||
, { "name": "nijs" }
|
||||
, { "name": "amdefine" }
|
||||
, { "name": "smartdc" }
|
||||
, { "name": "optparse" }
|
||||
, { "name": "jsontool" }
|
||||
, { "name": "swig" }
|
||||
, { "name": "coffee-script" }
|
||||
, { "name": "escape-html" }
|
||||
, { "name": "buffertools" }
|
||||
, { "name": "wu" }
|
||||
, { "name": "source-map" }
|
||||
, { "name": "knox" }
|
||||
, { "name": "node-expat" }
|
||||
, { "name": "optimist" }
|
||||
, { "name": "temp" }
|
||||
, { "name": "faye-websocket" }
|
||||
, { "name": "node-uuid" }
|
||||
, { "name": "rbytes" }
|
||||
, { "name": "sockjs" }
|
||||
, { "name": "backbone" }
|
||||
, { "name": "browserchannel" }
|
||||
, { "name": "node-gyp" }
|
||||
, { "name": "semver" }
|
||||
, { "name": "npm2nix" }
|
||||
]
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue