Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
{ stdenv, fetchurl, openssl, python, zlib, libuv, v8, utillinux, http-parser
|
||||
, pkgconfig, runCommand, which, unstableVersion ? false
|
||||
, pkgconfig, runCommand, which, libtool
|
||||
}:
|
||||
|
||||
let
|
||||
dtrace = runCommand "dtrace-native" {} ''
|
||||
mkdir -p $out/bin
|
||||
ln -sv /usr/sbin/dtrace $out/bin
|
||||
'';
|
||||
# nodejs 0.12 can't be built on armv5tel. Armv6 with FPU, minimum I think.
|
||||
# Related post: http://zo0ok.com/techfindings/archives/1820
|
||||
assert stdenv.system != "armv5tel-linux";
|
||||
|
||||
version = "0.12.0";
|
||||
let
|
||||
version = "4.1.0";
|
||||
|
||||
deps = {
|
||||
inherit openssl zlib libuv;
|
||||
@@ -32,33 +31,32 @@ in stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
|
||||
sha256 = "0cifd2qhpyrbxx71a4hsagzk24qas8m5zvwcyhx69cz9yhxf404p";
|
||||
sha256 = "453005f64ee529f7dcf1237eb27ee2fa2415c49f5c9e7463e8b71fba61c5b408";
|
||||
};
|
||||
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps);
|
||||
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ];
|
||||
dontDisableStatic = true;
|
||||
prePatch = ''
|
||||
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
patches = if stdenv.isDarwin then [ ./no-xcode.patch ] else null;
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
||||
|
||||
postPatch = if stdenv.isDarwin then ''
|
||||
(cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch})
|
||||
'' else null;
|
||||
|
||||
buildInputs = [ python openssl ]
|
||||
++ (optional stdenv.isLinux utillinux)
|
||||
++ optionals stdenv.isDarwin [ pkgconfig dtrace ];
|
||||
buildInputs = [ python http-parser zlib libuv openssl python ]
|
||||
++ (optional stdenv.isLinux utillinux);
|
||||
nativeBuildInputs = [ pkgconfig ]
|
||||
++ optional stdenv.isDarwin libtool;
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.interpreterName = "nodejs";
|
||||
|
||||
meta = {
|
||||
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
||||
homepage = http://nodejs.org;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.goibhniu maintainers.shlevy ];
|
||||
maintainers = [ maintainers.goibhniu maintainers.havvy ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
95
pkgs/development/web/nodejs/no-xcode-4.1.0.patch
Normal file
95
pkgs/development/web/nodejs/no-xcode-4.1.0.patch
Normal file
@@ -0,0 +1,95 @@
|
||||
diff --git a/configure b/configure
|
||||
index d199975..66d903b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -734,7 +734,7 @@ def configure_library(lib, output):
|
||||
# libpath needs to be provided ahead libraries
|
||||
if pkg_libpath:
|
||||
output['libraries'] += (
|
||||
- filter(None, map(str.strip, pkg_cflags.split('-L'))))
|
||||
+ pkg_libpath.split())
|
||||
|
||||
default_libs = getattr(options, shared_lib + '_libname')
|
||||
default_libs = map('-l{0}'.format, default_libs.split(','))
|
||||
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
index c002b11..fefb765 100644
|
||||
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
@@ -446,10 +446,17 @@ class XcodeSettings(object):
|
||||
|
||||
def _XcodeSdkPath(self, sdk_root):
|
||||
if sdk_root not in XcodeSettings._sdk_path_cache:
|
||||
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
|
||||
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
- if sdk_root:
|
||||
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ try:
|
||||
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
+ if sdk_root:
|
||||
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ except:
|
||||
+ # if this fails it's because xcodebuild failed, which means
|
||||
+ # the user is probably on a CLT-only system, where there
|
||||
+ # is no valid SDK root
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = None
|
||||
+
|
||||
return XcodeSettings._sdk_path_cache[sdk_root]
|
||||
|
||||
def _AppendPlatformVersionMinFlags(self, lst):
|
||||
@@ -572,10 +579,12 @@ class XcodeSettings(object):
|
||||
framework_root = sdk_root
|
||||
else:
|
||||
framework_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
+
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
|
||||
self.configname = None
|
||||
return cflags
|
||||
@@ -826,10 +835,12 @@ class XcodeSettings(object):
|
||||
sdk_root = self._SdkPath()
|
||||
if not sdk_root:
|
||||
sdk_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
+
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
|
||||
is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
|
||||
if sdk_root and is_extension:
|
||||
@@ -1032,7 +1043,11 @@ class XcodeSettings(object):
|
||||
sdk_root = self._SdkPath(config_name)
|
||||
if not sdk_root:
|
||||
sdk_root = ''
|
||||
- return l.replace('$(SDKROOT)', sdk_root)
|
||||
+
|
||||
+ if self._SdkPath():
|
||||
+ return l.replace('$(SDKROOT)', sdk_root)
|
||||
+ else:
|
||||
+ return l
|
||||
|
||||
def AdjustLibraries(self, libraries, config_name=None):
|
||||
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
|
||||
@@ -1248,7 +1263,7 @@ def XcodeVersion():
|
||||
if version:
|
||||
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
|
||||
else:
|
||||
- raise GypError("No Xcode or CLT version detected!")
|
||||
+ version = "7.0.0"
|
||||
# The CLT has no build information, so we return an empty string.
|
||||
version_list = [version, '']
|
||||
version = version_list[0]
|
||||
@@ -1,13 +1,11 @@
|
||||
{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http-parser, c-ares
|
||||
, pkgconfig, runCommand, which
|
||||
, pkgconfig, runCommand, which, libtool
|
||||
|
||||
# apple frameworks
|
||||
, CoreServices, ApplicationServices, Carbon, Foundation
|
||||
}:
|
||||
|
||||
let
|
||||
dtrace = runCommand "dtrace-native" {} ''
|
||||
mkdir -p $out/bin
|
||||
ln -sv /usr/sbin/dtrace $out/bin
|
||||
'';
|
||||
|
||||
version = "0.10.38";
|
||||
|
||||
# !!! Should we also do shared libuv?
|
||||
@@ -37,30 +35,34 @@ in stdenv.mkDerivation {
|
||||
sha256 = "12xpa9jzry5g0j41908498qqs8v0q6miqkv6mggyzas8bvnshgai";
|
||||
};
|
||||
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps);
|
||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++
|
||||
stdenv.lib.optional stdenv.isDarwin "--without-dtrace";
|
||||
|
||||
prePatch = ''
|
||||
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
patches = if stdenv.isDarwin then [ ./no-xcode.patch ] else null;
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
||||
|
||||
postPatch = if stdenv.isDarwin then ''
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
(cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch})
|
||||
'' else null;
|
||||
'';
|
||||
|
||||
buildInputs = [ python which ]
|
||||
++ (optional stdenv.isLinux utillinux)
|
||||
++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ];
|
||||
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool CoreServices ApplicationServices Foundation ];
|
||||
propagatedBuildInputs = optionals stdenv.isDarwin [ Carbon ];
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.interpreterName = "nodejs-0.10";
|
||||
|
||||
meta = {
|
||||
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
||||
homepage = http://nodejs.org;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.goibhniu maintainers.shlevy ];
|
||||
maintainers = [ maintainers.goibhniu ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
53
pkgs/development/web/nodejs/v4_1_0.nix
Normal file
53
pkgs/development/web/nodejs/v4_1_0.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ stdenv, fetchurl, openssl, python, zlib, libuv, v8, utillinux, http-parser
|
||||
, pkgconfig, runCommand, which, libtool
|
||||
}:
|
||||
|
||||
let
|
||||
version = "4.1.0";
|
||||
|
||||
deps = {
|
||||
inherit openssl zlib libuv;
|
||||
|
||||
# disabled system v8 because v8 3.14 no longer receives security fixes
|
||||
# we fall back to nodejs' internal v8 copy which receives backports for now
|
||||
# inherit v8
|
||||
} // (stdenv.lib.optionalAttrs (!stdenv.isDarwin) {
|
||||
inherit http-parser;
|
||||
});
|
||||
|
||||
inherit (stdenv.lib) concatMap optional optionals maintainers licenses platforms;
|
||||
in stdenv.mkDerivation {
|
||||
name = "nodejs-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
|
||||
sha256 = "025lqmhvl7xpx1ip97jwkz21a97sw9zb4zi3y7fgfag59vv0ac25";
|
||||
};
|
||||
|
||||
configureFlags = map (name: "--shared-${name}") (builtins.attrNames deps) ++ [ "--without-dtrace" ];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode-4.1.0.patch;
|
||||
|
||||
buildInputs = [ python which ] ++ (builtins.attrValues deps)
|
||||
++ optional stdenv.isLinux utillinux
|
||||
++ optionals stdenv.isDarwin [ openssl libtool ];
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.interpreterName = "nodejs";
|
||||
|
||||
meta = {
|
||||
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
||||
homepage = http://nodejs.org;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.goibhniu maintainers.havvy ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user