diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-10-03 14:45:56 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-10-03 15:23:13 +0200 |
commit | f361938b210e057906dcdd5471275ddf265e4a4e (patch) | |
tree | ea69e01503464f511e388d36fe69c3c689b42fbc /pkgs/development/web | |
parent | f2cb132c34d115761a19728a2a6a595f4fa08761 (diff) | |
parent | b233ecdca68e08940024da6e4e55e6ef2a20863f (diff) | |
download | nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.gz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.bz2 nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.lz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.xz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.zst nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.zip |
Merge staging into closure-size
This makes gcc5 the default builder, etc.
Diffstat (limited to 'pkgs/development/web')
-rw-r--r-- | pkgs/development/web/iojs/default.nix | 36 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/default-arch.patch | 24 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/no-xcode.patch | 21 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/pkg-libpath.patch | 13 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/v0_10.nix | 2 |
6 files changed, 78 insertions, 25 deletions
diff --git a/pkgs/development/web/iojs/default.nix b/pkgs/development/web/iojs/default.nix new file mode 100644 index 000000000000..a44a6d6c6c4a --- /dev/null +++ b/pkgs/development/web/iojs/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv }: + +let + version = "3.1.0"; + inherit (stdenv.lib) optional maintainers licenses platforms; +in stdenv.mkDerivation { + name = "iojs-${version}"; + + src = fetchurl { + url = "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz"; + sha256 = "15qh5pscg3588hyf4yfhma34gjkg87v5i4xzxj804g6m52m6y727"; + }; + + prePatch = '' + sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure + ''; + + configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" "--shared-libuv" ]; + + # iojs has --enable-static but no --disable-static. Automatically adding --disable-static + # causes configure to fail, so don't add --disable-static. + dontDisableStatic = true; + + buildInputs = [ python openssl http-parser zlib libuv ] ++ (optional stdenv.isLinux utillinux); + setupHook = ../nodejs/setup-hook.sh; + + passthru.interpreterName = "iojs"; + + meta = { + description = "A friendly fork of Node.js with an open governance model"; + homepage = https://iojs.org/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.havvy ]; + }; +} diff --git a/pkgs/development/web/nodejs/default-arch.patch b/pkgs/development/web/nodejs/default-arch.patch new file mode 100644 index 000000000000..3c7eb1014dee --- /dev/null +++ b/pkgs/development/web/nodejs/default-arch.patch @@ -0,0 +1,24 @@ +diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py +--- a/tools/gyp/pylib/gyp/xcode_emulation.py 2014-01-23 06:05:51.000000000 +0100 ++++ b/tools/gyp/pylib/gyp/xcode_emulation.py 2014-02-04 17:49:48.000000000 +0100 +@@ -1018,12 +1033,16 @@ + # Since the value returned by this function is only used when ARCHS is not + # set, then on iOS we return "i386", as the default xcode project generator + # does not set ARCHS if it is not set in the .gyp file. +- if self.isIOS: ++ ++ try: ++ if self.isIOS: ++ return 'i386' ++ version, build = self._XcodeVersion() ++ if version >= '0500': ++ return 'x86_64' + return 'i386' +- version, build = self._XcodeVersion() +- if version >= '0500': ++ except: + return 'x86_64' +- return 'i386' + + class MacPrefixHeader(object): + """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature. diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index 8337a092acb5..ca46db39a3f9 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -38,12 +38,13 @@ in stdenv.mkDerivation { dontDisableStatic = true; prePatch = '' patchShebangs . + sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py ''; - patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch; + patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./pkg-libpath.patch ]; - buildInputs = [ python http-parser zlib libuv openssl python ] - ++ (optional stdenv.isLinux utillinux); + buildInputs = [ python zlib libuv openssl python ] + ++ optionals stdenv.isLinux [ utillinux http-parser ] nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin libtool; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/web/nodejs/no-xcode.patch b/pkgs/development/web/nodejs/no-xcode.patch index e88168b68a77..244a55e9aebb 100644 --- a/pkgs/development/web/nodejs/no-xcode.patch +++ b/pkgs/development/web/nodejs/no-xcode.patch @@ -70,24 +70,3 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_ def AdjustLibraries(self, libraries, config_name=None): """Transforms entries like 'Cocoa.framework' in libraries into entries like -@@ -1018,12 +1033,16 @@ - # Since the value returned by this function is only used when ARCHS is not - # set, then on iOS we return "i386", as the default xcode project generator - # does not set ARCHS if it is not set in the .gyp file. -- if self.isIOS: -+ -+ try: -+ if self.isIOS: -+ return 'i386' -+ version, build = self._XcodeVersion() -+ if version >= '0500': -+ return 'x86_64' - return 'i386' -- version, build = self._XcodeVersion() -- if version >= '0500': -+ except: - return 'x86_64' -- return 'i386' - - class MacPrefixHeader(object): - """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature. diff --git a/pkgs/development/web/nodejs/pkg-libpath.patch b/pkgs/development/web/nodejs/pkg-libpath.patch new file mode 100644 index 000000000000..8ad94c0e3e2f --- /dev/null +++ b/pkgs/development/web/nodejs/pkg-libpath.patch @@ -0,0 +1,13 @@ +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/pkgs/development/web/nodejs/v0_10.nix b/pkgs/development/web/nodejs/v0_10.nix index bf19ba646fd7..47de2e72d403 100644 --- a/pkgs/development/web/nodejs/v0_10.nix +++ b/pkgs/development/web/nodejs/v0_10.nix @@ -42,7 +42,7 @@ in stdenv.mkDerivation { patchShebangs . ''; - patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch; + patches = stdenv.lib.optionals stdenv.isDarwin [ ./default-arch.patch ./no-xcode.patch ]; postPatch = stdenv.lib.optionalString stdenv.isDarwin '' (cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch}) |