forked from dashbitco/nimble_publisher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
description = "Elixir development environment"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
devShells.default = with pkgs; mkShell { | ||
packages = [ | ||
beam.packages.erlang_26.elixir_1_15 | ||
] ++ | ||
# Linux only | ||
lib.optionals stdenv.isLinux [ | ||
# for ExUnit notifier | ||
libnotify | ||
|
||
# for package - file_system | ||
inotify-tools | ||
] ++ | ||
# Darwin only | ||
lib.optionals stdenv.isDarwin [ | ||
# for ExUnit notifier | ||
terminal-notifier | ||
|
||
# for package - file_system | ||
darwin.apple_sdk.frameworks.CoreFoundation | ||
darwin.apple_sdk.frameworks.CoreServices | ||
]; | ||
|
||
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\"'" | ||
''; | ||
}; | ||
} | ||
); | ||
} |