@@ -0,0 +1,31 @@
1+{ stdenv, fetchurl, python, utillinux, nightly ? false }:
2+
3+let
4+ version = if nightly then "1.1.1-nightly201502072c3121c606" else "1.1.0";
5+ inherit (stdenv.lib) optional maintainers licenses platforms;
6+in stdenv.mkDerivation {
7+ name = "iojs-${version}";
8+
9+ src = fetchurl {
10+ url = if nightly
11+ then "https://iojs.org/download/nightly/v${version}/iojs-v${version}.tar.gz"
12+ else "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz";
13+ sha256 = if nightly
14+ then "1jjh5f8kpcgdjjib9q1f2hqvrs6p4m4fyfbfy6dsdbzl2hglajvw"
15+ else "0yvz3rw7d73snc1g447l4amqbbyydbyzr9ynykmyld7l3gdsif7h";
16+ };
17+
18+ prePatch = ''
19+ sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
20+ '';
21+
22+ buildInputs = [ python ] ++ (optional stdenv.isLinux utillinux);
23+ setupHook = ../nodejs/setup-hook.sh;
24+
25+ meta = {
26+ description = "A friendly fork of Node.js with an open governance model";
27+ homepage = https://iojs.org/;
28+ license = licenses.mit;
29+ platforms = platforms.linux;
30+ };
31+}