nixpkgs/pkgs/development/web/iojs/default.nix

36 lines
1.2 KiB
Nix
Raw Normal View History

2015-02-22 11:41:33 +00:00
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv, nightly ? false }:
2015-02-08 17:35:15 +00:00
let
2015-02-22 13:39:31 +00:00
version = if nightly then "1.2.1-nightly201502201bf91878e7" else "1.3.0";
2015-02-08 17:35:15 +00:00
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
2015-02-22 13:39:31 +00:00
then "1bk0jiha7n3s9xawj77d4q1navq28pq061w2wa6cs70lik7n6ri4"
else "08g0kmz2978jrfx4551fi12ypcsv9p6vic89lfs08ki7ajw2yrgb";
2015-02-08 17:35:15 +00:00
};
prePatch = ''
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
'';
2015-02-22 11:41:33 +00:00
configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" "--shared-libuv" ];
2015-02-22 11:41:33 +00:00
buildInputs = [ python openssl http-parser zlib libuv ] ++ (optional stdenv.isLinux utillinux);
2015-02-08 17:35:15 +00:00
setupHook = ../nodejs/setup-hook.sh;
passthru.interpreterName = "iojs";
2015-02-08 17:35:15 +00:00
meta = {
description = "A friendly fork of Node.js with an open governance model";
homepage = https://iojs.org/;
license = licenses.mit;
platforms = platforms.linux;
};
}