diff options
author | Vincent Ambo <mail@tazj.in> | 2018-07-12 21:48:43 +0200 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2018-07-14 20:05:53 +0200 |
commit | 0cf4c904697bed80c8f311d8bad6abd0dc390477 (patch) | |
tree | 0b955c630cd4002627b7e971520f9f203688a842 | |
parent | 68cd907d1ec4497340f6970ca7006a0c4ddec609 (diff) |
rebar3: 3.4.3 -> 3.6.1
Updates rebar3 to version 3.6.1, which amongst other things introduces
support for rebar3 on Erlang/OTP 21.
Changes made:
* rebar3 and dependencies updated to new versions
* rebar3 hermeticity patch updated to apply against new version
* hex package registry snapshot updated
3 files changed, 42 insertions, 44 deletions
diff --git a/pkgs/development/beam-modules/hex-registry-snapshot.nix b/pkgs/development/beam-modules/hex-registry-snapshot.nix index 6f127d86285b..991e9717b801 100644 --- a/pkgs/development/beam-modules/hex-registry-snapshot.nix +++ b/pkgs/development/beam-modules/hex-registry-snapshot.nix @@ -2,15 +2,14 @@ stdenv.mkDerivation rec { name = "hex-registry"; - rev = "9f736e7"; - version = "0.0.0+build.${rev}"; + rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1"; + version = "20180712.${rev}"; - # src = /home/gleber/code/erl/hex-pm-registry-snapshots; src = fetchFromGitHub { - owner = "erlang-nix"; - repo = "hex-pm-registry-snapshots"; inherit rev; - sha256 = "1xiw5yifyk3bbmr0cr82y1nc4c6zk11f6azdv07glb7yrgccrv79"; + owner = "erlang-nix"; + repo = "hex-pm-registry-snapshots"; + sha256 = "0dbpcrdh6jqmvnm1ysmy7ixyc95vnbqmikyx5kk77qwgyd43fqgi"; }; installPhase = '' diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix index 04555f58884b..ff6dc07ea9e9 100644 --- a/pkgs/development/tools/build-managers/rebar3/default.nix +++ b/pkgs/development/tools/build-managers/rebar3/default.nix @@ -3,19 +3,19 @@ tree, fetchFromGitHub, hexRegistrySnapshot }: let - version = "3.4.3"; + version = "3.6.1"; bootstrapper = ./rebar3-nix-bootstrap; erlware_commons = fetchHex { pkg = "erlware_commons"; - version = "1.0.0"; - sha256 = "0wkphbrjk19lxdwndy92v058qwcaz13bcgdzp33h21aa7vminzx7"; + version = "1.2.0"; + sha256 = "149kkn9gc9cjgvlmakygq475r63q2rry31s29ax0s425dh37sfl7"; }; ssl_verify_fun = fetchHex { pkg = "ssl_verify_fun"; - version = "1.1.2"; - sha256 = "0qdyx70v09fydv4wzz1djnkixqj62ny40yjjhv2q6mh47lns2arj"; + version = "1.1.3"; + sha256 = "1zljxashfhqmiscmf298vhr880ppwbgi2rl3nbnyvsfn0mjhw4if"; }; certifi = fetchHex { pkg = "certifi"; @@ -24,23 +24,23 @@ let }; providers = fetchHex { pkg = "providers"; - version = "1.6.0"; - sha256 = "0byfa1h57n46jilz4q132j0vk3iqc0v1vip89li38gb1k997cs0g"; + version = "1.7.0"; + sha256 = "19p4rbsdx9lm2ihgvlhxyld1q76kxpd7qwyqxxsgmhl5r8ln3rlb"; }; getopt = fetchHex { pkg = "getopt"; - version = "0.8.2"; - sha256 = "1xw30h59zbw957cyjd8n50hf9y09jnv9dyry6x3avfwzcyrnsvkk"; + version = "1.0.1"; + sha256 = "174mb46c2qd1f4a7507fng4vvscjh1ds7rykfab5rdnfp61spqak"; }; bbmustache = fetchHex { pkg = "bbmustache"; - version = "1.3.0"; - sha256 = "042pfgss8kscq6ssg8gix8ccmdsrx0anjczsbrn2a6c36ljrx2p6"; + version = "1.5.0"; + sha256 = "0xg3r4lxhqifrv32nm55b4zmkflacc1s964g15p6y6jfx6v4y1zd"; }; relx = fetchHex { pkg = "relx"; - version = "3.23.1"; - sha256 = "13j7wds2d7b8v3r9pwy3zhwhzywgwhn6l9gm3slqzyrs1jld0a9d"; + version = "3.26.0"; + sha256 = "1f810rb01kdidpa985s321ycg3y4hvqpzbk263n6i1bfnqykkvv9"; }; cf = fetchHex { pkg = "cf"; @@ -49,13 +49,13 @@ let }; cth_readable = fetchHex { pkg = "cth_readable"; - version = "1.3.0"; - sha256 = "1s7bqj6f2zpbyjmbfq2mm6vcz1jrxjr2nd0531wshsx6fnshqhvs"; + version = "1.4.2"; + sha256 = "1pjid4f60pp81ds01rqa6ybksrnzqriw3aibilld1asn9iabxkav"; }; eunit_formatters = fetchHex { pkg = "eunit_formatters"; - version = "0.3.1"; - sha256 = "0cg9dasv60v09q3q4wja76pld0546mhmlpb0khagyylv890hg934"; + version = "0.5.0"; + sha256 = "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n"; }; rebar3_hex = fetchHex { pkg = "rebar3_hex"; @@ -70,7 +70,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://github.com/rebar/rebar3/archive/${version}.tar.gz"; - sha256 = "1a05gpxxc3mx5v33kzpb5xnq5vglmjl0q8hrcvpinjlazcwbg531"; + sha256 = "0cqhqymzh10pfyxqiy4hcg3d2myz3chx0y4m2ixmq8zk81acics0"; }; inherit bootstrapper; @@ -121,6 +121,6 @@ stdenv.mkDerivation { ''; platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.gleber ]; + maintainers = with stdenv.lib.maintainers; [ gleber tazjin ]; }; } diff --git a/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch b/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch index db45827f5831..59004561126c 100644 --- a/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch +++ b/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch @@ -1,5 +1,5 @@ diff --git a/bootstrap b/bootstrap -index 7c56bab..16c1be5 100755 +index 5dedd713..864056c4 100755 --- a/bootstrap +++ b/bootstrap @@ -101,7 +101,7 @@ extract(Binary) -> @@ -12,9 +12,8 @@ index 7c56bab..16c1be5 100755 [{body_format, binary}], rebar) of diff --git a/src/rebar_hermeticity.erl b/src/rebar_hermeticity.erl -new file mode 100644 -index 0000000..8f6cc7d ---- /dev/null +index e69de29b..8f6cc7d0 100644 +--- a/src/rebar_hermeticity.erl +++ b/src/rebar_hermeticity.erl @@ -0,0 +1,42 @@ +%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- @@ -60,20 +59,20 @@ index 0000000..8f6cc7d + ?ERROR("Request: ~p ~s", [Method, Url]), + erlang:halt(1). diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl -index d588f24..9ac8ad4 100644 +index 2cf167ee..6080aaca 100644 --- a/src/rebar_pkg_resource.erl +++ b/src/rebar_pkg_resource.erl -@@ -109,7 +109,7 @@ make_vsn(_) -> +@@ -127,7 +127,7 @@ make_vsn(_) -> request(Url, ETag) -> - HttpOptions = [{ssl, ssl_opts(Url)}, {relaxed, true} | rebar_utils:get_proxy_auth()], - -- case httpc:request(get, {Url, [{"if-none-match", ETag} || ETag =/= false]++[{"User-Agent", rebar_utils:user_agent()}]}, -+ case rebar_hermeticity:request(get, {Url, [{"if-none-match", ETag} || ETag =/= false]++[{"User-Agent", rebar_utils:user_agent()}]}, - HttpOptions, - [{body_format, binary}], - rebar) of + HttpOptions = [{ssl, ssl_opts(Url)}, + {relaxed, true} | rebar_utils:get_proxy_auth()], +- case httpc:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""} ++ case rebar_hermeticity:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""} + || ETag =/= false] ++ + [{"User-Agent", rebar_utils:user_agent()}]}, + HttpOptions, [{body_format, binary}], rebar) of diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl -index a019c5a..697cbab 100644 +index 17446311..4d44d794 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -38,6 +38,8 @@ init(State) -> @@ -85,17 +84,17 @@ index a019c5a..697cbab 100644 do(State) -> try case rebar_packages:registry_dir(State) of -@@ -52,7 +54,7 @@ do(State) -> - case rebar_utils:url_append_path(CDN, ?REMOTE_REGISTRY_FILE) of +@@ -53,7 +55,7 @@ do(State) -> {ok, Url} -> + HttpOptions = [{relaxed, true} | rebar_utils:get_proxy_auth()], ?DEBUG("Fetching registry from ~p", [Url]), - case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, + case rebar_hermeticity:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, - [], [{stream, TmpFile}, {sync, true}], + HttpOptions, [{stream, TmpFile}, {sync, true}], rebar) of {ok, saved_to_file} -> -@@ -76,6 +78,7 @@ do(State) -> - ?DEBUG("Error creating package index: ~p ~p", [C, erlang:get_stacktrace()]), +@@ -77,6 +79,7 @@ do(State) -> + ?DEBUG("Error creating package index: ~p ~p", [C, S]), throw(?PRV_ERROR(package_index_write)) end. +-endif. |