-
Notifications
You must be signed in to change notification settings - Fork 17
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
4 changed files
with
70 additions
and
0 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 |
---|---|---|
|
@@ -23,3 +23,7 @@ erl_crash.dump | |
pathex-*.tar | ||
|
||
/.elixir_ls/ | ||
|
||
# Nix auto shell | ||
.direnv | ||
.envrc |
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,9 @@ | ||
{ | ||
description = "Pathex: Elixir language lenses and Access replacement"; | ||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
outputs = { nixpkgs, ... }: | ||
let pkgs = nixpkgs.legacyPackages.x86_64-linux; | ||
in { | ||
devShells.x86_64-linux.default = import ./shell.nix { inherit pkgs; }; | ||
}; | ||
} |
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,30 @@ | ||
{ pkgs ? (import <nixpkgs> { }), ... }: | ||
with pkgs; | ||
let otp = beam.packages.erlangR26; | ||
in pkgs.mkShell { | ||
buildInputs = [ | ||
otp.elixir_1_16 | ||
otp.erlang | ||
((if otp ? elixir-ls then otp.elixir-ls else otp.elixir_ls).override { | ||
elixir = otp.elixir_1_16; | ||
}) | ||
]; | ||
|
||
shellHook = '' | ||
# keep your shell history in iex | ||
export ERL_AFLAGS="-kernel shell_history enabled" | ||
# Force UTF8 in CLI | ||
export LANG="C.UTF-8" | ||
# this isolates mix to work only in 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="${otp.hex}/lib/erlang/lib/hex/ebin" | ||
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH | ||
''; | ||
} |