generated from rakshans1/elixir-starter
-
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
8 changed files
with
114 additions
and
272 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1 @@ | ||
use_nix | ||
use flake . |
Empty file.
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 = "Livebook Starter"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
}; | ||
|
||
inherit (pkgs) inotify-tools terminal-notifier; | ||
inherit (pkgs.lib) optionals; | ||
inherit (pkgs.stdenv) isDarwin isLinux; | ||
|
||
linuxDeps = optionals isLinux [ inotify-tools ]; | ||
darwinDeps = optionals isDarwin [ terminal-notifier ] | ||
++ (with pkgs.darwin.apple_sdk.frameworks; optionals isDarwin [ | ||
CoreFoundation | ||
CoreServices | ||
]); | ||
|
||
in | ||
{ | ||
devShells = { | ||
default = pkgs.mkShell { | ||
packages = with pkgs; [ | ||
beam.packages.erlangR26.elixir_1_15 | ||
] ++ linuxDeps ++ darwinDeps; | ||
shellHook = '' | ||
# this allows mix to work on the local directory | ||
mkdir -p .nix-mix .nix-hex | ||
export MIX_HOME=$PWD/.nix-mix | ||
export HEX_HOME=$PWD/.nix-hex | ||
# make hex from Nixpkgs available | ||
# `mix local.hex` will install hex into MIX_HOME and should take precedence | ||
export MIX_PATH="${pkgs.beam.packages.erlangR26.hex}/lib/erlang/lib/hex/ebin" | ||
export PATH=${pkgs.erlangR26}/bin:$MIX_HOME/escripts:$MIX_HOME/bin:$HEX_HOME/bin:bin:$PATH | ||
export LANG=C.UTF-8 | ||
# keep your shell history in iex | ||
export ERL_AFLAGS="-kernel shell_history enabled" | ||
export MIX_ENV=dev | ||
''; | ||
}; | ||
}; | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.