git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #6234 from valeriangalliat/iojs

Add io.js

commitfb41f0302ea4cc3ef3f95ade31341e95baf05d92 authorlethalman <lucabru@src.gnome.org> dateSun 22 Feb 2015, 12:26 (12 years ago) parentdd4e1d462b17c8
3 files changed+41−1
pkgs/development/web/iojs/default.nix+33 pkgs/development/web/nodejs/build-node-package.nix+1−1 pkgs/top-level/all-packages.nix+7
pkgs/development/web/iojs/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, nightly ? false }:
2+
3+let
4+ version = if nightly then "1.2.1-nightly20150213f0296933f8" else "1.2.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 "0v9njaggddi128v58rd34qknph8pn9c653gqd4y29l1mwjvqg62s"
15+ else "17axqswpl252gliak1wjc2l9jk6n5jqdfa9f1vv7x9acj776yrik";
16+ };
17+
18+ prePatch = ''
19+ sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
20+ '';
21+
22+ configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" ];
23+
24+ buildInputs = [ python openssl http-parser zlib ] ++ (optional stdenv.isLinux utillinux);
25+ setupHook = ../nodejs/setup-hook.sh;
26+
27+ meta = {
28+ description = "A friendly fork of Node.js with an open governance model";
29+ homepage = https://iojs.org/;
30+ license = licenses.mit;
31+ platforms = platforms.linux;
32+ };
33+}
pkgs/development/web/nodejs/build-node-package.nix+1−1
@@ -38,7 +38,7 @@ let
3838
3939 sources = runCommand "node-sources" {} ''
4040 tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
41− mv *node* $out
41+ mv $(find . -type d -mindepth 1 -maxdepth 1) $out
4242 '';
4343
4444 # Convert deps to attribute set
pkgs/top-level/all-packages.nix+7
@@ -1731,6 +1731,13 @@ let
17311731 callPackage ./node-packages.nix { self = nodePackages; }
17321732 );
17331733
1734+ iojs = callPackage ../development/web/iojs { };
1735+ iojs-nightly = callPackage ../development/web/iojs { nightly = true; };
1736+
1737+ iojsPackages = recurseIntoAttrs (
1738+ callPackage ./node-packages.nix { self = iojsPackages; nodejs = iojs; }
1739+ );
1740+
17341741 ldapvi = callPackage ../tools/misc/ldapvi { };
17351742
17361743 ldns = callPackage ../development/libraries/ldns { };