-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathflake.nix
57 lines (52 loc) · 1.4 KB
/
flake.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
description = "A pure dev environment for Veeps";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
# Versions!!!
elixir_version = "elixir_1_17";
erlang_version = "erlang_27";
pkgs = nixpkgs.legacyPackages.${system};
in
with pkgs;
{
devShells.default = mkShell {
buildInputs =
[
bash
beam.packages.${erlang_version}.${elixir_version}
inotify-tools
pkgs.${erlang_version}
]
++ lib.optionals stdenv.isLinux [
libnotify
inotify-tools
]
++ lib.optionals stdenv.isDarwin [
terminal-notifier
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
];
shellHook = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export ERL_AFLAGS='-kernel shell_history enabled'
mix local.hex --force --if-missing
mix local.rebar --force --if-missing
'';
};
}
);
}