-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
41 lines (36 loc) · 966 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ pkgs ? import <nixpkgs> { }, nixpkgs ? <nixpkgs>, }:
let
inherit (pkgs.lib) optional optionals;
erlang = pkgs.beam.interpreters.erlangR25;
elixir = pkgs.beam.packages.erlangR25.elixir_1_14;
in pkgs.mkShell rec {
name = "advent-of-code-shell";
buildInputs = with pkgs;
[
git
shellcheck
shfmt
nil
nixfmt
rebar
rebar3
erlang
elixir
elixir_ls
gleam
tree-sitter
] ++ optional stdenv.isLinux inotify-tools ++ optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
shellHook = ''
# this allows mix to work on the local directory
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
export ERL_AFLAGS="-kernel shell_history enabled"
export ERL_LIBS=""
'';
}