Merge pull request #9941 from utdemir/upgrade-nodejs-4-1
nodejs: 0.12.7 -> 4.1.0
This commit is contained in:
commit
55e8d8ea61
@ -1,36 +0,0 @@
|
|||||||
{ stdenv, fetchurl, python, utillinux, openssl_1_0_2, 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_1_0_2 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 ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Fetch the latest io.js release (stable/nightly) and update
|
|
||||||
# `default.nix` in this directory.
|
|
||||||
#
|
|
||||||
# Call this from the root of your nixpkgs directory.
|
|
||||||
#
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
HERE="$(dirname "$0")"
|
|
||||||
|
|
||||||
latest() {
|
|
||||||
curl -s "$1" | grep 'href="v' \
|
|
||||||
| tail -1 | sed 's/.*href="v//;s/\/".*//'
|
|
||||||
}
|
|
||||||
|
|
||||||
latest_log() {
|
|
||||||
echo "Getting latest $1 version from $2" >&2
|
|
||||||
version=$(latest "$2")
|
|
||||||
echo "version -> $version" >&2
|
|
||||||
echo "$version"
|
|
||||||
}
|
|
||||||
|
|
||||||
url() {
|
|
||||||
nix-instantiate -A "$1" \
|
|
||||||
| xargs cat \
|
|
||||||
| sed 's/.*"urls","//;s/".*//'
|
|
||||||
}
|
|
||||||
|
|
||||||
hash() {
|
|
||||||
nix-prefetch-url "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
hash_log() {
|
|
||||||
echo "Finding hash for $1" >&2
|
|
||||||
value=$(hash "$1")
|
|
||||||
echo "hash -> $value" >&2
|
|
||||||
echo "$value"
|
|
||||||
}
|
|
||||||
|
|
||||||
stableVersion=$(latest_log stable 'https://iojs.org/dist/')
|
|
||||||
stableHash=$(hash_log "$(url iojs.src)")
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
"/version = /s/\"[^\"]*\"/\"$stableVersion\"/" \
|
|
||||||
"$HERE/default.nix"
|
|
||||||
sed -i \
|
|
||||||
"/sha256 = /s/\"[^\"]*\"/\"$stableHash\"/" \
|
|
||||||
"$HERE/default.nix"
|
|
@ -7,7 +7,7 @@
|
|||||||
assert stdenv.system != "armv5tel-linux";
|
assert stdenv.system != "armv5tel-linux";
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.12.7";
|
version = "4.1.0";
|
||||||
|
|
||||||
deps = {
|
deps = {
|
||||||
inherit openssl zlib libuv;
|
inherit openssl zlib libuv;
|
||||||
@ -31,18 +31,18 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
|
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
|
||||||
sha256 = "17gk29zbw58l0sjjfw86acp39pkiblnq0gsq1jdrd70w0pgn8gdj";
|
sha256 = "453005f64ee529f7dcf1237eb27ee2fa2415c49f5c9e7463e8b71fba61c5b408";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ];
|
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ];
|
||||||
|
dontDisableStatic = true;
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
||||||
|
|
||||||
buildInputs = [ python which ]
|
buildInputs = [ python which http-parser zlib libuv openssl python ]
|
||||||
++ (optional stdenv.isLinux utillinux)
|
++ (optional stdenv.isLinux utillinux)
|
||||||
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
|
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
@ -2008,8 +2008,9 @@ let
|
|||||||
|
|
||||||
ninka = callPackage ../development/tools/misc/ninka { };
|
ninka = callPackage ../development/tools/misc/ninka { };
|
||||||
|
|
||||||
nodejs-0_12 = callPackage ../development/web/nodejs {
|
nodejs-4_1 = callPackage ../development/web/nodejs {
|
||||||
libuv = libuvVersions.v1_6_1;
|
libuv = libuvVersions.v1_6_1;
|
||||||
|
openssl = openssl_1_0_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix {
|
nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix {
|
||||||
@ -2019,20 +2020,16 @@ let
|
|||||||
nodejs = if stdenv.system == "armv5tel-linux" then
|
nodejs = if stdenv.system == "armv5tel-linux" then
|
||||||
nodejs-0_10
|
nodejs-0_10
|
||||||
else
|
else
|
||||||
nodejs-0_12;
|
nodejs-4_1;
|
||||||
|
|
||||||
nodePackages_0_12 = callPackage ./node-packages.nix { self = nodePackages_0_12; nodejs = nodejs-0_12; };
|
nodePackages_4_1 = callPackage ./node-packages.nix { self = nodePackages_4_1; nodejs = nodejs-4_1; };
|
||||||
|
|
||||||
nodePackages_0_10 = callPackage ./node-packages.nix { self = nodePackages_0_10; nodejs = nodejs-0_10; };
|
nodePackages_0_10 = callPackage ./node-packages.nix { self = nodePackages_0_10; nodejs = nodejs-0_10; };
|
||||||
|
|
||||||
nodePackages = if stdenv.system == "armv5tel-linux" then
|
nodePackages = if stdenv.system == "armv5tel-linux" then
|
||||||
nodePackages_0_10
|
nodePackages_0_10
|
||||||
else
|
else
|
||||||
nodePackages_0_12;
|
nodePackages_4_1;
|
||||||
|
|
||||||
iojs = callPackage ../development/web/iojs { libuv = libuvVersions.v1_6_1; };
|
|
||||||
|
|
||||||
iojsPackages = callPackage ./node-packages.nix { self = iojsPackages; nodejs = iojs; };
|
|
||||||
|
|
||||||
npm2nix = nodePackages.npm2nix;
|
npm2nix = nodePackages.npm2nix;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user