summary refs log tree commit diff
path: root/pkgs/development/web/iojs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/web/iojs/default.nix')
-rw-r--r--pkgs/development/web/iojs/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/web/iojs/default.nix b/pkgs/development/web/iojs/default.nix
new file mode 100644
index 000000000000..a44a6d6c6c4a
--- /dev/null
+++ b/pkgs/development/web/iojs/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, python, utillinux, openssl, 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 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 ];
+  };
+}