Skip to content

Instantly share code, notes, and snippets.

@frectonz
Created July 26, 2024 18:30
Show Gist options
  • Save frectonz/c0775b759de3a1e9bec2a0176c9079bb to your computer and use it in GitHub Desktop.
Save frectonz/c0775b759de3a1e9bec2a0176c9079bb to your computer and use it in GitHub Desktop.
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
packages = [
pkgs.elixir
pkgs.exercism
pkgs.elixir-ls
] ++
# Linux only
pkgs.lib.optionals pkgs.stdenv.isLinux [
# for ExUnit notifier
pkgs.libnotify
# for package - file_system
pkgs.inotify-tools
];
shellHook = ''
# limit mix to current project
mkdir -p .nix-mix
export MIX_HOME=$PWD/.nix-mix
# rewire executables
export PATH=$MIX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
# limit history to current project
export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '\"$PWD/.erlang-history\"'"
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment