@@ -1,5 +1,5 @@
11diff --git a/bootstrap b/bootstrap
2−index 35759b0..939c838 100755
2+index c36fddb..9fcb718 100755
33--- a/bootstrap
44+++ b/bootstrap
55@@ -7,9 +7,11 @@ main(_) ->
@@ -9,42 +9,44 @@ index 35759b0..939c838 100755
99- inets:start(),
1010- inets:start(httpc, [{profile, rebar}]),
1111- set_httpc_options(),
12−+ %% Removed for hermeticity on Nix
12++ %% Removed for hermeticity on Nix
1313+ %%
14−+ %% inets:start(),
15−+ %% inets:start(httpc, [{profile, rebar}]),
16−+ %% set_httpc_options(),
17−
14++ %% inets:start(),
15++ %% inets:start(httpc, [{profile, rebar}]),
16++ %% set_httpc_options(),
17+
1818 %% Fetch and build deps required to build rebar3
1919 BaseDeps = [{providers, []}
20−@@ -74,12 +76,12 @@ default_registry_file() ->
20+@@ -73,13 +75,13 @@ default_registry_file() ->
21+ CacheDir = filename:join([Home, ".cache", "rebar3"]),
2122 filename:join([CacheDir, "hex", "default", "registry"]).
22−
23− fetch_and_compile({Name, ErlFirstFiles}, Deps) ->
23+
24+-fetch_and_compile({Name, ErlFirstFiles}, Deps) ->
2425- case lists:keyfind(Name, 1, Deps) of
2526- {Name, Vsn} ->
2627- ok = fetch({pkg, atom_to_binary(Name, utf8), list_to_binary(Vsn)}, Name);
2728- {Name, _, Source} ->
2829- ok = fetch(Source, Name)
2930- end,
31++fetch_and_compile({Name, ErlFirstFiles}, _Deps) ->
3032+ %% case lists:keyfind(Name, 1, Deps) of
3133+ %% {Name, Vsn} ->
3234+ %% ok = fetch({pkg, atom_to_binary(Name, utf8), list_to_binary(Vsn)}, Name);
3335+ %% {Name, _, Source} ->
3436+ %% ok = fetch(Source, Name)
3537+ %% end,
36−
38+
3739 %% Hack: erlware_commons depends on a .script file to check if it is being built with
3840 %% rebar2 or rebar3. But since rebar3 isn't built yet it can't get the vsn with get_key.
39−@@ -88,63 +90,63 @@ fetch_and_compile({Name, ErlFirstFiles}, Deps) ->
40−
41+@@ -88,67 +90,67 @@ fetch_and_compile({Name, ErlFirstFiles}, Deps) ->
42+
4143 compile(Name, ErlFirstFiles).
42−
44+
4345-fetch({pkg, Name, Vsn}, App) ->
4446- Dir = filename:join([filename:absname("_build/default/lib/"), App]),
4547- case filelib:is_dir(Dir) of
4648- false ->
47−- CDN = "https://s3.amazonaws.com/s3.hex.pm/tarballs",
49+- CDN = "https://repo.hex.pm/tarballs",
4850- Package = binary_to_list(<<Name/binary, "-", Vsn/binary, ".tar">>),
4951- Url = string:join([CDN, Package], "/"),
5052- case request(Url) of
@@ -85,7 +87,11 @@ index 35759b0..939c838 100755
8587- end.
8688-
8789-get_http_vars(Scheme) ->
88−- proplists:get_value(Scheme, get_rebar_config(), []).
90+- OS = case os:getenv(atom_to_list(Scheme)) of
91+- Str when is_list(Str) -> Str;
92+- _ -> []
93+- end,
94+- proplists:get_value(Scheme, get_rebar_config(), OS).
8995-
9096-set_httpc_options() ->
9197- set_httpc_options(https_proxy, get_http_vars(https_proxy)),
@@ -101,7 +107,7 @@ index 35759b0..939c838 100755
101107+%% Dir = filename:join([filename:absname("_build/default/lib/"), App]),
102108+%% case filelib:is_dir(Dir) of
103109+%% false ->
104−+%% CDN = "https://s3.amazonaws.com/s3.hex.pm/tarballs",
110++%% CDN = "https://repo.hex.pm/tarballs",
105111+%% Package = binary_to_list(<<Name/binary, "-", Vsn/binary, ".tar">>),
106112+%% Url = string:join([CDN, Package], "/"),
107113+%% case request(Url) of
@@ -142,7 +148,11 @@ index 35759b0..939c838 100755
142148+%% end.
143149+
144150+%% get_http_vars(Scheme) ->
145−+%% proplists:get_value(Scheme, get_rebar_config(), []).
151++%% OS = case os:getenv(atom_to_list(Scheme)) of
152++%% Str when is_list(Str) -> Str;
153++%% _ -> []
154++%% end,
155++%% proplists:get_value(Scheme, get_rebar_config(), OS).
146156+
147157+%% set_httpc_options() ->
148158+%% set_httpc_options(https_proxy, get_http_vars(https_proxy)),
@@ -154,6 +164,6 @@ index 35759b0..939c838 100755
154164+%% set_httpc_options(Scheme, Proxy) ->
155165+%% {ok, {_, _, Host, Port, _, _}} = http_uri:parse(Proxy),
156166+%% httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar).
157−
167+
158168 compile(App, FirstFiles) ->
159169 Dir = filename:join(filename:absname("_build/default/lib/"), App),