forked from elixir-explorer/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (62 loc) · 1.61 KB
/
flake.nix
File metadata and controls
65 lines (62 loc) · 1.61 KB
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
{
description = "Explorer";
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
fenix,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [fenix.overlays.default];
pkgs = import nixpkgs {inherit overlays system;};
rustToolchain = pkgs.fenix.fromToolchainName {
name = (nixpkgs.lib.importTOML ./rust-toolchain.toml).toolchain.channel;
sha256 = "sha256-UAoZcxg3iWtS+2n8TFNfANFt/GmkuOMDf7QAE0fRxeA=";
};
rustPkg = rustToolchain.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
];
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs;
[
act
clang
elixir
erlang_27
libiconv
openssl
pkg-config
rustPkg
rust-analyzer-nightly
cmake
awscli2
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
shellHook = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export PATH=$MIX_HOME/bin:$PATH
export PATH=$HEX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
'';
};
});
}