Merge pull request #43430 from tazjin/rebar3-3.6.1

rebar3: 3.4.3 -> 3.6.1
This commit is contained in:
xeji 2018-07-14 21:10:11 +02:00 committed by GitHub
commit fbcb86966d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 65 deletions

View File

@ -2,15 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hex-registry"; name = "hex-registry";
rev = "9f736e7"; rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1";
version = "0.0.0+build.${rev}"; version = "20180712.${rev}";
# src = /home/gleber/code/erl/hex-pm-registry-snapshots;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "erlang-nix";
repo = "hex-pm-registry-snapshots";
inherit rev; inherit rev;
sha256 = "1xiw5yifyk3bbmr0cr82y1nc4c6zk11f6azdv07glb7yrgccrv79"; owner = "erlang-nix";
repo = "hex-pm-registry-snapshots";
sha256 = "0dbpcrdh6jqmvnm1ysmy7ixyc95vnbqmikyx5kk77qwgyd43fqgi";
}; };
installPhase = '' installPhase = ''

View File

@ -3,19 +3,19 @@
tree, fetchFromGitHub, hexRegistrySnapshot }: tree, fetchFromGitHub, hexRegistrySnapshot }:
let let
version = "3.4.3"; version = "3.6.1";
bootstrapper = ./rebar3-nix-bootstrap; bootstrapper = ./rebar3-nix-bootstrap;
erlware_commons = fetchHex { erlware_commons = fetchHex {
pkg = "erlware_commons"; pkg = "erlware_commons";
version = "1.0.0"; version = "1.2.0";
sha256 = "0wkphbrjk19lxdwndy92v058qwcaz13bcgdzp33h21aa7vminzx7"; sha256 = "149kkn9gc9cjgvlmakygq475r63q2rry31s29ax0s425dh37sfl7";
}; };
ssl_verify_fun = fetchHex { ssl_verify_fun = fetchHex {
pkg = "ssl_verify_fun"; pkg = "ssl_verify_fun";
version = "1.1.2"; version = "1.1.3";
sha256 = "0qdyx70v09fydv4wzz1djnkixqj62ny40yjjhv2q6mh47lns2arj"; sha256 = "1zljxashfhqmiscmf298vhr880ppwbgi2rl3nbnyvsfn0mjhw4if";
}; };
certifi = fetchHex { certifi = fetchHex {
pkg = "certifi"; pkg = "certifi";
@ -24,23 +24,23 @@ let
}; };
providers = fetchHex { providers = fetchHex {
pkg = "providers"; pkg = "providers";
version = "1.6.0"; version = "1.7.0";
sha256 = "0byfa1h57n46jilz4q132j0vk3iqc0v1vip89li38gb1k997cs0g"; sha256 = "19p4rbsdx9lm2ihgvlhxyld1q76kxpd7qwyqxxsgmhl5r8ln3rlb";
}; };
getopt = fetchHex { getopt = fetchHex {
pkg = "getopt"; pkg = "getopt";
version = "0.8.2"; version = "1.0.1";
sha256 = "1xw30h59zbw957cyjd8n50hf9y09jnv9dyry6x3avfwzcyrnsvkk"; sha256 = "174mb46c2qd1f4a7507fng4vvscjh1ds7rykfab5rdnfp61spqak";
}; };
bbmustache = fetchHex { bbmustache = fetchHex {
pkg = "bbmustache"; pkg = "bbmustache";
version = "1.3.0"; version = "1.5.0";
sha256 = "042pfgss8kscq6ssg8gix8ccmdsrx0anjczsbrn2a6c36ljrx2p6"; sha256 = "0xg3r4lxhqifrv32nm55b4zmkflacc1s964g15p6y6jfx6v4y1zd";
}; };
relx = fetchHex { relx = fetchHex {
pkg = "relx"; pkg = "relx";
version = "3.23.1"; version = "3.26.0";
sha256 = "13j7wds2d7b8v3r9pwy3zhwhzywgwhn6l9gm3slqzyrs1jld0a9d"; sha256 = "1f810rb01kdidpa985s321ycg3y4hvqpzbk263n6i1bfnqykkvv9";
}; };
cf = fetchHex { cf = fetchHex {
pkg = "cf"; pkg = "cf";
@ -49,13 +49,13 @@ let
}; };
cth_readable = fetchHex { cth_readable = fetchHex {
pkg = "cth_readable"; pkg = "cth_readable";
version = "1.3.0"; version = "1.4.2";
sha256 = "1s7bqj6f2zpbyjmbfq2mm6vcz1jrxjr2nd0531wshsx6fnshqhvs"; sha256 = "1pjid4f60pp81ds01rqa6ybksrnzqriw3aibilld1asn9iabxkav";
}; };
eunit_formatters = fetchHex { eunit_formatters = fetchHex {
pkg = "eunit_formatters"; pkg = "eunit_formatters";
version = "0.3.1"; version = "0.5.0";
sha256 = "0cg9dasv60v09q3q4wja76pld0546mhmlpb0khagyylv890hg934"; sha256 = "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n";
}; };
rebar3_hex = fetchHex { rebar3_hex = fetchHex {
pkg = "rebar3_hex"; pkg = "rebar3_hex";
@ -70,7 +70,7 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
url = "https://github.com/rebar/rebar3/archive/${version}.tar.gz"; url = "https://github.com/rebar/rebar3/archive/${version}.tar.gz";
sha256 = "1a05gpxxc3mx5v33kzpb5xnq5vglmjl0q8hrcvpinjlazcwbg531"; sha256 = "0cqhqymzh10pfyxqiy4hcg3d2myz3chx0y4m2ixmq8zk81acics0";
}; };
inherit bootstrapper; inherit bootstrapper;
@ -121,6 +121,6 @@ stdenv.mkDerivation {
''; '';
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.gleber ]; maintainers = with stdenv.lib.maintainers; [ gleber tazjin ];
}; };
} }

View File

@ -1,5 +1,5 @@
diff --git a/bootstrap b/bootstrap diff --git a/bootstrap b/bootstrap
index 7c56bab..16c1be5 100755 index 5dedd713..864056c4 100755
--- a/bootstrap --- a/bootstrap
+++ b/bootstrap +++ b/bootstrap
@@ -101,7 +101,7 @@ extract(Binary) -> @@ -101,7 +101,7 @@ extract(Binary) ->
@ -12,9 +12,8 @@ index 7c56bab..16c1be5 100755
[{body_format, binary}], [{body_format, binary}],
rebar) of rebar) of
diff --git a/src/rebar_hermeticity.erl b/src/rebar_hermeticity.erl diff --git a/src/rebar_hermeticity.erl b/src/rebar_hermeticity.erl
new file mode 100644 index e69de29b..8f6cc7d0 100644
index 0000000..8f6cc7d --- a/src/rebar_hermeticity.erl
--- /dev/null
+++ b/src/rebar_hermeticity.erl +++ b/src/rebar_hermeticity.erl
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
+%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- +%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
@ -60,20 +59,20 @@ index 0000000..8f6cc7d
+ ?ERROR("Request: ~p ~s", [Method, Url]), + ?ERROR("Request: ~p ~s", [Method, Url]),
+ erlang:halt(1). + erlang:halt(1).
diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl 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 --- a/src/rebar_pkg_resource.erl
+++ b/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) -> request(Url, ETag) ->
HttpOptions = [{ssl, ssl_opts(Url)}, {relaxed, true} | rebar_utils:get_proxy_auth()], 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 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()}]}, + case rebar_hermeticity:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""}
HttpOptions, || ETag =/= false] ++
[{body_format, binary}], [{"User-Agent", rebar_utils:user_agent()}]},
rebar) of HttpOptions, [{body_format, binary}], rebar) of
diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl 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 --- a/src/rebar_prv_update.erl
+++ b/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl
@@ -38,6 +38,8 @@ init(State) -> @@ -38,6 +38,8 @@ init(State) ->
@ -85,17 +84,17 @@ index a019c5a..697cbab 100644
do(State) -> do(State) ->
try try
case rebar_packages:registry_dir(State) of case rebar_packages:registry_dir(State) of
@@ -52,7 +54,7 @@ do(State) -> @@ -53,7 +55,7 @@ do(State) ->
case rebar_utils:url_append_path(CDN, ?REMOTE_REGISTRY_FILE) of
{ok, Url} -> {ok, Url} ->
HttpOptions = [{relaxed, true} | rebar_utils:get_proxy_auth()],
?DEBUG("Fetching registry from ~p", [Url]), ?DEBUG("Fetching registry from ~p", [Url]),
- case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, - case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]},
+ case rebar_hermeticity: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 rebar) of
{ok, saved_to_file} -> {ok, saved_to_file} ->
@@ -76,6 +78,7 @@ do(State) -> @@ -77,6 +79,7 @@ do(State) ->
?DEBUG("Error creating package index: ~p ~p", [C, erlang:get_stacktrace()]), ?DEBUG("Error creating package index: ~p ~p", [C, S]),
throw(?PRV_ERROR(package_index_write)) throw(?PRV_ERROR(package_index_write))
end. end.
+-endif. +-endif.

View File

@ -1,32 +1,23 @@
{ stdenv, fetchFromGitHub, buildRebar3, buildHex { stdenv, fetchFromGitHub, buildRebar3, buildHex,
, getopt_0_8_2, erlware_commons_1_0_0 }: # Erlang dependencies:
ibrowse_4_2_2,
getopt_0_8_2,
erlware_commons_1_0_0,
jsx_2_8_0 }:
let
ibrowse_4_4_0 = buildHex {
name = "ibrowse";
version = "4.4.0";
sha256 = "1hpic1xgksfm00mbl1kwmszca6jmjca32s7gdd8g11i0hy45k3ka";
};
jsx_2_8_2 = buildHex {
name = "jsx";
version = "2.8.2";
sha256 = "0k7lnmwqbgpmh90wy30kc0qlddkbh9r3sjlyayaqsz1r1cix7idl";
};
in
buildRebar3 rec { buildRebar3 rec {
name = "hex2nix"; name = "hex2nix";
version = "0.0.6"; version = "0.0.6-a31eadd7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "erlang-nix"; owner = "erlang-nix";
repo = "hex2nix"; repo = "hex2nix";
rev = "${version}"; rev = "a31eadd7af2cbdac1b87991b378e98ea4fb40ae0";
sha256 = "17rkzg836v7z2xf0i5m8zqfvr23dbmw1bi3c83km92f9glwa1dbf"; sha256 = "1hnkrksyrbpq2gq25rfsrnm86n0g3biab88gswm3zj88ddrz6dyk";
}; };
beamDeps = [ ibrowse_4_4_0 jsx_2_8_2 erlware_commons_1_0_0 getopt_0_8_2 ]; beamDeps = [ ibrowse_4_2_2 jsx_2_8_0 erlware_commons_1_0_0 getopt_0_8_2 ];
enableDebugInfo = true; enableDebugInfo = true;