bootstrap/specs/mix/template
Joshua Potter 720f15ffc0 Anchor filetype extension in pre-commits. 2023-12-13 12:05:51 -07:00
..
.githooks Anchor filetype extension in pre-commits. 2023-12-13 12:05:51 -07:00
.envrc Add formatting pre-commit to elixir projects. 2023-11-29 09:18:10 -07:00
README.md Normalize bash prompts and flake descriptions. 2023-12-01 10:12:16 -07:00
default.nix Add mix spec. (#8) 2023-11-26 16:38:55 -07:00
deps.nix Add mix spec. (#8) 2023-11-26 16:38:55 -07:00
flake.lock Add mix spec. (#8) 2023-11-26 16:38:55 -07:00
flake.nix Bundle frontend dependencies into release. (#11) 2023-12-02 06:28:37 -07:00

README.md

Mix Flake Template

This is a template for constructing a working environment for Elixir development (version 1.15.7, Erlang/OTP 25) with the mix tool. direnv can be used to launch a dev shell upon entering this directory (refer to .envrc). Otherwise run via:

$ nix develop

Dependencies

This project pins Mix dependencies using mix2nix. After updating your mix.lock file, make sure to re-run the following:

mix2nix > deps.nix

As of now, mix2nix cannot handle git dependencies found inside the mix.lock file. If you have git dependencies, add them manually or use FODs.

Language Server

The elixir-ls LSP (version 0.17.10) is included in this flake.

Formatting

Formatting depends on the mix format task. A pre-commit hook is included in .githooks that can be used to format all *.exs? files prior to commit. Install via:

$ git config --local core.hooksPath .githooks/

If running direnv, this hook is installed automatically when entering the directory.