@@ -142,7 +142,7 @@ defmodule ElixirMake.Artefact do
142142 ## Archive/NIF urls
143143
144144 @ doc """
145- Returns all available target- url pairs available.
145+ Returns all available {{ target, nif_version}, url} pairs available.
146146 """
147147 def available_target_urls ( config , precompiler ) do
148148 targets = precompiler . all_supported_targets ( :fetch )
@@ -171,7 +171,8 @@ defmodule ElixirMake.Artefact do
171171 archive_filename = archive_filename ( config , target , nif_version )
172172
173173 [
174- { target , String . replace ( url_template , "@{artefact_filename}" , archive_filename ) }
174+ { { target , nif_version } ,
175+ String . replace ( url_template , "@{artefact_filename}" , archive_filename ) }
175176 | acc
176177 ]
177178 else
@@ -187,12 +188,13 @@ defmodule ElixirMake.Artefact do
187188 Returns the url for the current target.
188189 """
189190 def current_target_url ( config , precompiler , nif_version ) do
190- case precompiler . current_target ( nif_version ) do
191+ case precompiler . current_target ( ) do
191192 { :ok , current_target } ->
192193 available_urls = available_target_urls ( config , precompiler )
194+ target_at_nif_version = { current_target , nif_version }
193195
194- case List . keyfind ( available_urls , current_target , 0 ) do
195- { ^ current_target , download_url } ->
196+ case List . keyfind ( available_urls , target_at_nif_version , 0 ) do
197+ { ^ target_at_nif_version , download_url } ->
196198 { :ok , current_target , download_url }
197199
198200 nil ->
0 commit comments