-
Notifications
You must be signed in to change notification settings - Fork 121
/
flake.nix
55 lines (53 loc) · 1.45 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
{
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 = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ fenix.overlays.default ];
pkgs = import nixpkgs { inherit overlays system; };
toolchain = "latest";
rustPkg = fenix.packages.${system}.${toolchain}.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
];
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
act
clang
elixir
erlangR26
libiconv
openssl
pkg-config
rustPkg
rust-analyzer-nightly
cmake
] ++ 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
'';
};
});
}