Merge branch 'master.upstream' into staging.upstream

This commit is contained in:
William A. Kennington III
2015-09-29 15:54:33 -07:00
546 changed files with 25528 additions and 2488 deletions

View File

@@ -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 ];
};
}

View File

@@ -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"

View File

@@ -7,7 +7,7 @@
assert stdenv.system != "armv5tel-linux";
let
version = "0.12.7";
version = "4.1.0";
deps = {
inherit openssl zlib libuv;
@@ -31,18 +31,18 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
sha256 = "17gk29zbw58l0sjjfw86acp39pkiblnq0gsq1jdrd70w0pgn8gdj";
sha256 = "453005f64ee529f7dcf1237eb27ee2fa2415c49f5c9e7463e8b71fba61c5b408";
};
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ];
dontDisableStatic = true;
prePatch = ''
patchShebangs .
'';
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)
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
setupHook = ./setup-hook.sh;