tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nodejs-5_0: add package
Sander van der Burg
10 years ago
a06dd213
e61ad128
+67
2 changed files
expand all
collapse all
unified
split
pkgs
development
web
nodejs
v5_0.nix
top-level
all-packages.nix
+62
pkgs/development/web/nodejs/v5_0.nix
···
1
1
+
{ stdenv, fetchurl, openssl, python, zlib, libuv, v8, utillinux, http-parser
2
2
+
, pkgconfig, runCommand, which, libtool
3
3
+
}:
4
4
+
5
5
+
# nodejs 5.0.0 can't be built on armv5tel. Armv6 with FPU, minimum I think.
6
6
+
# Related post: http://zo0ok.com/techfindings/archives/1820
7
7
+
assert stdenv.system != "armv5tel-linux";
8
8
+
9
9
+
let
10
10
+
version = "5.0.0";
11
11
+
12
12
+
deps = {
13
13
+
inherit openssl zlib libuv;
14
14
+
15
15
+
# disabled system v8 because v8 3.14 no longer receives security fixes
16
16
+
# we fall back to nodejs' internal v8 copy which receives backports for now
17
17
+
# inherit v8
18
18
+
} // (stdenv.lib.optionalAttrs (!stdenv.isDarwin) {
19
19
+
inherit http-parser;
20
20
+
});
21
21
+
22
22
+
sharedConfigureFlags = name: [
23
23
+
"--shared-${name}"
24
24
+
"--shared-${name}-includes=${builtins.getAttr name deps}/include"
25
25
+
"--shared-${name}-libpath=${builtins.getAttr name deps}/lib"
26
26
+
];
27
27
+
28
28
+
inherit (stdenv.lib) concatMap optional optionals maintainers licenses platforms;
29
29
+
in stdenv.mkDerivation {
30
30
+
name = "nodejs-${version}";
31
31
+
32
32
+
src = fetchurl {
33
33
+
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz";
34
34
+
sha256 = "1x6dmk78k4cpdzvxi8390w2w0pvkb6bc1rc64l5a5rks0ri9d3b9";
35
35
+
};
36
36
+
37
37
+
configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ];
38
38
+
dontDisableStatic = true;
39
39
+
prePatch = ''
40
40
+
patchShebangs .
41
41
+
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
42
42
+
'';
43
43
+
44
44
+
patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./pkg-libpath.patch ];
45
45
+
46
46
+
buildInputs = [ python which zlib libuv openssl python ]
47
47
+
++ optionals stdenv.isLinux [ utillinux http-parser ]
48
48
+
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
49
49
+
setupHook = ./setup-hook.sh;
50
50
+
51
51
+
enableParallelBuilding = true;
52
52
+
53
53
+
passthru.interpreterName = "nodejs";
54
54
+
55
55
+
meta = {
56
56
+
description = "Event-driven I/O framework for the V8 JavaScript engine";
57
57
+
homepage = http://nodejs.org;
58
58
+
license = licenses.mit;
59
59
+
maintainers = [ maintainers.goibhniu maintainers.havvy ];
60
60
+
platforms = platforms.linux ++ platforms.darwin;
61
61
+
};
62
62
+
}
+5
pkgs/top-level/all-packages.nix
···
2048
2048
2049
2049
ninka = callPackage ../development/tools/misc/ninka { };
2050
2050
2051
2051
+
nodejs-5_0 = callPackage ../development/web/nodejs/v5_0.nix {
2052
2052
+
libtool = darwin.cctools;
2053
2053
+
openssl = openssl_1_0_2;
2054
2054
+
};
2055
2055
+
2051
2056
nodejs-4_2 = callPackage ../development/web/nodejs {
2052
2057
libtool = darwin.cctools;
2053
2058
openssl = openssl_1_0_2;