TL;DR It’s impossible to execute this task outside of mix
project.
From the Mix.Tasks.Archive.Install
documentation:
If no argument is supplied but there is an archive in the project’s root directory (created with mix archive.build), then the archive will be installed locally. For example:
mix do archive.build, archive.install
If an argument is provided, it should be a local path or a URL to a prebuilt archive, a git repository, a github repository, or a hex package.
mix archive.install
calls archive.build
under the hood. The error you are receiving is introduced by archive.build
, which, unlike install
, receives -i
option.
It, in turn, expects the installation spec to be present.
The summing up: one might provide the dep_spec
as shown in the source linked above, but in general mix
just does not understand where to build the downloaded packages. Afterward, it will nevertheless be in doubt, where to install it. So the simplest solution would be to create the empty project with mix new
and then execute these tasks there.