-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
69 lines (64 loc) · 1.96 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
58
59
60
61
62
63
64
65
66
67
68
69
{
description = "Ethex Flake";
inputs = {
rust-overlay.url = "github:oxalica/rust-overlay";
nixpkgs.url = "github:NixOS/nixpkgs?ref=master";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
LANG = "C.UTF-8";
in
with pkgs; {
devShells.default = mkShell {
inherit LANG;
buildInputs = [
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
})
rust-analyzer
pkg-config
openssl
cargo
binaryen
just
zellij
curl
jq
unzip
nodejs_22
erlang_26
beam.packages.erlang_26.elixir_1_18
]
++ lib.optionals stdenv.isLinux [
libnotify
inotify-tools
]
++ lib.optionals stdenv.isDarwin ([
terminal-notifier
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
]);
shellHook = ''
# 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
export ERL_LIBS=$HEX_HOME/lib/erlang/lib
export PATH=$MIX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
export PATH=$HEX_HOME/bin:$PATH
export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '\"$PWD/.erlang-history\"'"
export ELIXIR_ERL_OPTIONS="+fnu"
# export HEX_MIRROR=https://hexpm.upyun.com
# export RUSTLER_NIF_VERSION=2.16
'';
};
}
);
}