mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
Update io.js
This commit is contained in:
parent
71008a00b9
commit
63f7dc60ff
|
@ -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 = ''
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue