Merge pull request #6234 from valeriangalliat/iojs

Add io.js
This commit is contained in:
lethalman 2015-02-22 12:26:22 +01:00
commit fb41f0302e
3 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,33 @@
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, nightly ? false }:
let
version = if nightly then "1.2.1-nightly20150213f0296933f8" else "1.2.0";
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 "0v9njaggddi128v58rd34qknph8pn9c653gqd4y29l1mwjvqg62s"
else "17axqswpl252gliak1wjc2l9jk6n5jqdfa9f1vv7x9acj776yrik";
};
prePatch = ''
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
'';
configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" ];
buildInputs = [ python openssl http-parser zlib ] ++ (optional stdenv.isLinux utillinux);
setupHook = ../nodejs/setup-hook.sh;
meta = {
description = "A friendly fork of Node.js with an open governance model";
homepage = https://iojs.org/;
license = licenses.mit;
platforms = platforms.linux;
};
}

View File

@ -38,7 +38,7 @@ let
sources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv *node* $out
mv $(find . -type d -mindepth 1 -maxdepth 1) $out
'';
# Convert deps to attribute set

View File

@ -1731,6 +1731,13 @@ let
callPackage ./node-packages.nix { self = nodePackages; }
);
iojs = callPackage ../development/web/iojs { };
iojs-nightly = callPackage ../development/web/iojs { nightly = true; };
iojsPackages = recurseIntoAttrs (
callPackage ./node-packages.nix { self = iojsPackages; nodejs = iojs; }
);
ldapvi = callPackage ../tools/misc/ldapvi { };
ldns = callPackage ../development/libraries/ldns { };