nixpkgs/pkgs/development/web/iojs/default.nix
2015-04-15 21:01:48 -07:00

32 lines
952 B
Nix

{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv }:
let
version = "1.6.4";
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 = "1qzvf7g457dppzxn23wppjcm09vh1n6bhsvz5szhwgjvl0iv2pc7";
};
prePatch = ''
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
'';
configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" "--shared-libuv" ];
buildInputs = [ python openssl 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;
};
}