Merge staging into closure-size

This commit is contained in:
Vladimír Čunát
2015-05-05 11:49:03 +02:00
869 changed files with 36249 additions and 30352 deletions
+4 -8
View File
@@ -1,18 +1,14 @@
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv, nightly ? false }:
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv }:
let
version = if nightly then "1.6.5-nightly20150409ff74931107" else "1.6.4";
version = "1.6.4";
inherit (stdenv.lib) optional maintainers licenses platforms;
in stdenv.mkDerivation {
name = "iojs-${version}";
src = fetchurl {
url = if nightly
then "https://iojs.org/download/nightly/v${version}/iojs-v${version}.tar.gz"
else "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz";
sha256 = if nightly
then "04f7r4iv8p0jfylw4sxg3vsv14rbsi6n9hbqnwvdh6554yrm6d35"
else "1qzvf7g457dppzxn23wppjcm09vh1n6bhsvz5szhwgjvl0iv2pc7";
url = "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz";
sha256 = "1qzvf7g457dppzxn23wppjcm09vh1n6bhsvz5szhwgjvl0iv2pc7";
};
prePatch = ''
+7 -11
View File
@@ -18,7 +18,7 @@ latest() {
latest_log() {
echo "Getting latest $1 version from $2" >&2
version=$(latest "$2")
echo " -> $version" >&2
echo "version -> $version" >&2
echo "$version"
}
@@ -35,20 +35,16 @@ hash() {
hash_log() {
echo "Finding hash for $1" >&2
value=$(hash "$1")
echo " -> $value" >&2
echo "hash -> $value" >&2
echo "$value"
}
stable=$(latest_log stable 'https://iojs.org/dist/')
nightly=$(latest_log nightly 'https://iojs.org/download/nightly/')
sed -i \
"/version = if nightly/s/then.*/then \"$nightly\" else \"$stable\";/" \
"$HERE/default.nix"
stableVersion=$(latest_log stable 'https://iojs.org/dist/')
stableHash=$(hash_log "$(url iojs.src)")
nightlyHash=$(hash_log "$(url iojs-nightly.src)")
sed -i \
"/sha256 = if nightly/{N;s/\"[^\"]*\"/\"$nightlyHash\"/;N;s/\"[^\"]*\";/\"$stableHash\";/}" \
"/version = /s/\"[^\"]*\"/\"$stableVersion\"/" \
"$HERE/default.nix"
sed -i \
"/sha256 = /s/\"[^\"]*\"/\"$stableHash\"/" \
"$HERE/default.nix"
@@ -64,7 +64,7 @@ let
stdenv.lib.platforms.${removePrefix "!" entry} or [];
in
# Ignore unknown platforms
if filterPlatforms == [] then platforms
if filterPlatforms == [] then (if platforms == [] then nodejs.meta.platforms else platforms)
else
if hasPrefix "!" entry then
subtractLists (intersectLists filterPlatforms nodejs.meta.platforms) platforms
+2
View File
@@ -54,6 +54,8 @@ in stdenv.mkDerivation {
++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ];
setupHook = ./setup-hook.sh;
passthru.interpreterName = "nodejs-0.10";
meta = {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = http://nodejs.org;