Skip to content

pfac/asdf-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asdf-elixir

Elixir plugin for asdf version manager

Install

This plugin needs unzip to be installed.

If you have a Debian system you can install it by typing: sudo apt-get install unzip

Elixir requires Erlang to be installed. You can use the asdf-erlang plugin to install Erlang versions.

asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git

Elixir precompiled versions

Precompiled Elixir packages are built by Bob whenever a git push or a new release is made at the elixir repo. There's also a status page available with an overview of all available packages and their availability.

The precompiled packages are built against every officially supported OTP version, however if you only specify the elixir version, like 1.4.5, the downloaded binaries will be those compiled against the oldest OTP release supported by that version.

If you would like to use precompiled binaries built with a more recent OTP, you can append -otp-${OTP_MAJOR_VERSION} to any installable version that can be given to asdf-elixir.

So, for example, to install Elixir 1.5.0 and take advantage of the new features from OTP-20 you might install version 1.5.0-otp-20.

Be sure to also install the corresponding Erlang/OTP version with asdf-erlang, and to have both selected versions in your .tool-versions file.

Compiling from a git reference or source

You can download and compile elixir as of a specific commit reference from the elixir github repository. For example:

asdf install elixir ref:161f5f9a3b6bc38faa152e08c567486b71b0602a

You can also compile elixir from source without using asdf (for example, so that you can use the master branch of elixir or a branch with your own modifications), then symlink and use it as a named version:

ln -s /path/to/elixir ~/.asdf/installs/elixir/master
asdf reshim elixir master

This version of Elixir will always reflect the most recently compiled version in the specified folder.

.tool-versions file

You can specify the version to install with a line like so in your .tool-versions file:

elixir ref-<commit reference>

or

elixir master

Using the CLI

You can install the version using: asdf install elixir ref:<commit reference>.

You can then set the local/global version to your new version with asdf local elixir ref-<commit reference> or asdf global elixir ref-<commit reference>.

Elixir escripts support

This plugin supports elixir escripts adding them to your path just like any other elixir binary. Whenever you install a new escript with mix escript.install you need to asdf reshim elixir in order to create shims for it.

Use

Check asdf readme for instructions on how to install & manage versions of Elixir.

About

Elixir plugin for asdf version manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.1%
  • Elixir 0.9%