-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
59 lines (52 loc) · 1.47 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
{
description = "Environment for developing and deploying the Commander project.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
# rustToolchain = pkgs.pkgsBuildHost.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
# # extensions = [ "rust-src" ];
# targets = [ "x86_64-unknown-linux-musl" ];
# });
in {
devShells.default = pkgs.mkShell {
name = "Commander Dev";
buildInputs = with pkgs; [
# Rust toolchain
# (rustToolchain.override {
# extensions = ["rust-src" "rust-std" "rust-analyzer"];
# })
cargo-cross
# Misc
ripgrep
#openssl
#pkg-config
#perl
#findutils
];
shellHook = ''
# if running from zsh, reenter zsh
if [[ $(ps -e | grep $PPID) == *"zsh" ]]; then
zsh
exit
fi
'';
};
formatter = nixpkgs.legacyPackages.${system}.alejandra;
}
);
}