nodejs-5_0: add package

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