Skip to content

Instantly share code, notes, and snippets.

@zetashift
Last active March 16, 2021 20:14
Show Gist options
  • Save zetashift/bea480af22c0ec82dc424b39ac5f7f1f to your computer and use it in GitHub Desktop.
Save zetashift/bea480af22c0ec82dc424b39ac5f7f1f to your computer and use it in GitHub Desktop.
Elixir minimum shell.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
erlang = erlangR23;
elixir = elixir_1_11;
nodejs = nodejs-14_x;
inputs = [
cacert
git
erlang
elixir
nodejs
postgresql
];
hooks = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export PATH=$MIX_HOME/bin:$PATH
export PATH=$HEX_HOME/bin:$PATH
export LANG=en_US.UTF-8
'';
in mkShell {
buildInputs = inputs
++ lib.optional stdenv.isLinux inotify-tools
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
shellHook = hooks;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment