-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathflake.nix
52 lines (47 loc) · 1.13 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
{
description = "gfold development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [
(import rust-overlay)
];
rust-version = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
rust-bin-with-overrides = rust-version.override {
extensions = ["rust-analyzer" "rust-src"];
};
pkgs = import nixpkgs {inherit overlays system;};
in
with pkgs; rec {
devShells.default = mkShell {
packages = [
alejandra
bash
cargo-audit
cargo-bloat
cargo-outdated
cargo-udeps
coreutils
hyperfine
just
rust-bin-with-overrides
];
};
formatter = alejandra;
});
}