diff --git a/pkgs/development/web/iojs/default.nix b/pkgs/development/web/iojs/default.nix index 3129b10f7b80..e13877e871ea 100644 --- a/pkgs/development/web/iojs/default.nix +++ b/pkgs/development/web/iojs/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, nightly ? false }: let - version = if nightly then "1.2.1-nightly20150213f0296933f8" else "1.2.0"; + version = if nightly then "1.2.1-nightly201502201bf91878e7" else "1.3.0"; inherit (stdenv.lib) optional maintainers licenses platforms; in stdenv.mkDerivation { name = "iojs-${version}"; @@ -11,8 +11,8 @@ in stdenv.mkDerivation { then "https://iojs.org/download/nightly/v${version}/iojs-v${version}.tar.gz" else "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz"; sha256 = if nightly - then "0v9njaggddi128v58rd34qknph8pn9c653gqd4y29l1mwjvqg62s" - else "17axqswpl252gliak1wjc2l9jk6n5jqdfa9f1vv7x9acj776yrik"; + then "1bk0jiha7n3s9xawj77d4q1navq28pq061w2wa6cs70lik7n6ri4" + else "08g0kmz2978jrfx4551fi12ypcsv9p6vic89lfs08ki7ajw2yrgb"; }; prePatch = '' diff --git a/maintainers/scripts/update-iojs b/pkgs/development/web/iojs/update-iojs similarity index 84% rename from maintainers/scripts/update-iojs rename to pkgs/development/web/iojs/update-iojs index e9accf273bf8..e0e073a0ff9b 100755 --- a/maintainers/scripts/update-iojs +++ b/pkgs/development/web/iojs/update-iojs @@ -1,4 +1,10 @@ -#!/bin/sh +#!/bin/sh -e +# +# Fetch the latest io.js release (stable/nightly) and update +# `default.nix` in this directory. +# + +cd "$(dirname "$0")" latest() { curl -s "$1" | grep 'href="v' \ @@ -33,11 +39,11 @@ nightly=$(latest_log nightly 'https://iojs.org/download/nightly/') sed -i \ "/version = if nightly/s/then.*/then \"$nightly\" else \"$stable\";/" \ - pkgs/development/web/iojs/default.nix + default.nix stableHash=$(hash_log "$(url iojs.src)") nightlyHash=$(hash_log "$(url iojs-nightly.src)") sed -i \ "/sha256 = if nightly/{N;s/\"[^\"]*\"/\"$nightlyHash\"/;N;s/\"[^\"]*\";/\"$stableHash\";/}" \ - pkgs/development/web/iojs/default.nix + default.nix