-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
flake.nix
40 lines (36 loc) · 942 Bytes
/
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
{
description = "A Nix-flake-based Rust development environment";
inputs = {
flake-utils.url = "https://flakehub.com/f/numtide/flake-utils/0.1.*.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405.*.tar.gz";
rust-overlay.url = "https://flakehub.com/f/oxalica/rust-overlay/0.1.*.tar.gz";
};
outputs =
{ self
, flake-utils
, nixpkgs
, rust-overlay
}:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
rust-overlay.overlays.default
(final: prev: {
rustToolchain = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
})
];
pkgs = import nixpkgs { inherit system overlays; };
in
{
devShell = pkgs.mkShell {
packages = with pkgs; [
rustToolchain
cargo-deny
cargo-edit
bacon
diesel-cli
postgresql
];
};
});
}