diff --git a/pkgs/development/web/iojs/default.nix b/pkgs/development/web/iojs/default.nix deleted file mode 100644 index 6a0c8ca512e..00000000000 --- a/pkgs/development/web/iojs/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, fetchurl, python, utillinux, openssl_1_0_2, 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_1_0_2 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 ]; - }; -} diff --git a/pkgs/development/web/iojs/update-iojs b/pkgs/development/web/iojs/update-iojs deleted file mode 100755 index 837238f27c6..00000000000 --- a/pkgs/development/web/iojs/update-iojs +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# Fetch the latest io.js release (stable/nightly) and update -# `default.nix` in this directory. -# -# Call this from the root of your nixpkgs directory. -# - -set -e - -HERE="$(dirname "$0")" - -latest() { - curl -s "$1" | grep 'href="v' \ - | tail -1 | sed 's/.*href="v//;s/\/".*//' -} - -latest_log() { - echo "Getting latest $1 version from $2" >&2 - version=$(latest "$2") - echo "version -> $version" >&2 - echo "$version" -} - -url() { - nix-instantiate -A "$1" \ - | xargs cat \ - | sed 's/.*"urls","//;s/".*//' -} - -hash() { - nix-prefetch-url "$1" -} - -hash_log() { - echo "Finding hash for $1" >&2 - value=$(hash "$1") - echo "hash -> $value" >&2 - echo "$value" -} - -stableVersion=$(latest_log stable 'https://iojs.org/dist/') -stableHash=$(hash_log "$(url iojs.src)") - -sed -i \ - "/version = /s/\"[^\"]*\"/\"$stableVersion\"/" \ - "$HERE/default.nix" -sed -i \ - "/sha256 = /s/\"[^\"]*\"/\"$stableHash\"/" \ - "$HERE/default.nix" diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index 0f41723ee94..440ed7aca92 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -7,7 +7,7 @@ assert stdenv.system != "armv5tel-linux"; let - version = "0.12.7"; + version = "4.1.0"; deps = { inherit openssl zlib libuv; @@ -31,18 +31,18 @@ in stdenv.mkDerivation { src = fetchurl { url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.gz"; - sha256 = "17gk29zbw58l0sjjfw86acp39pkiblnq0gsq1jdrd70w0pgn8gdj"; + sha256 = "453005f64ee529f7dcf1237eb27ee2fa2415c49f5c9e7463e8b71fba61c5b408"; }; configureFlags = concatMap sharedConfigureFlags (builtins.attrNames deps) ++ [ "--without-dtrace" ]; - + dontDisableStatic = true; prePatch = '' patchShebangs . ''; patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch; - buildInputs = [ python which ] + buildInputs = [ python which http-parser zlib libuv openssl python ] ++ (optional stdenv.isLinux utillinux) ++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1704d4b34a..1524a6b0b4d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2008,8 +2008,9 @@ let ninka = callPackage ../development/tools/misc/ninka { }; - nodejs-0_12 = callPackage ../development/web/nodejs { + nodejs-4_1 = callPackage ../development/web/nodejs { libuv = libuvVersions.v1_6_1; + openssl = openssl_1_0_2; }; nodejs-0_10 = callPackage ../development/web/nodejs/v0_10.nix { @@ -2019,20 +2020,16 @@ let nodejs = if stdenv.system == "armv5tel-linux" then nodejs-0_10 else - nodejs-0_12; + nodejs-4_1; - nodePackages_0_12 = callPackage ./node-packages.nix { self = nodePackages_0_12; nodejs = nodejs-0_12; }; + nodePackages_4_1 = callPackage ./node-packages.nix { self = nodePackages_4_1; nodejs = nodejs-4_1; }; nodePackages_0_10 = callPackage ./node-packages.nix { self = nodePackages_0_10; nodejs = nodejs-0_10; }; nodePackages = if stdenv.system == "armv5tel-linux" then nodePackages_0_10 else - nodePackages_0_12; - - iojs = callPackage ../development/web/iojs { libuv = libuvVersions.v1_6_1; }; - - iojsPackages = callPackage ./node-packages.nix { self = iojsPackages; nodejs = iojs; }; + nodePackages_4_1; npm2nix = nodePackages.npm2nix;