git.iko.soy/typeable/nixpkgs
on master help sign in
Add io.js
commitc56256709bcba7182b0820fe697abf0fc703d64c authorValérian Galliat <val@codejam.info> dateSun 8 Feb 2015, 18:35 (12 years ago) parent1aed33f
3 files changed+39−1
pkgs/development/web/iojs/default.nix+31 pkgs/development/web/nodejs/build-node-package.nix+1−1 pkgs/top-level/all-packages.nix+7
pkgs/development/web/iojs/default.nixnew file+31
@@ -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+}
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
@@ -1729,6 +1729,13 @@ let
17291729 callPackage ./node-packages.nix { self = nodePackages; }
17301730 );
17311731
1732+ iojs = callPackage ../development/web/iojs { };
1733+ iojs-nightly = callPackage ../development/web/iojs { nightly = true; };
1734+
1735+ iojsPackages = recurseIntoAttrs (
1736+ callPackage ./node-packages.nix { self = iojsPackages; nodejs = iojs; }
1737+ );
1738+
17321739 ldapvi = callPackage ../tools/misc/ldapvi { };
17331740
17341741 ldns = callPackage ../development/libraries/ldns { };