A small hint for all the users out there.

I don't know about you, but I always cringed at how dirty mix is when it comes to installing third party toolchain dependencies.

Twelve years into using it, I learned that you can actually localise third-party installations!

Here's a snippet from my .

```sh
mkdir -p .nix-mix .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-mix
[ -z "$(ls -A .nix-mix)" ] && mix local.hex
[ -z "$(ls -A .nix-mix)" ] && mix local.rebar
```

This can make your builds pure without faking HOME!

@jonn neat idea, but I don’t think the tests actually work right. If it installs Hex, it won’t be able to install rebar, right? Might be better to use `mix local.hex —force —if-missing; mix local.rebar —force —if-missing ` instead.

Follow

@IslandUsurper ok, next time I sh*t-talk I should remember that I'm as stupid 😆

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.