-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
46 lines (41 loc) · 1.08 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
{
description = "Rust devShell with Fenix stable toolchain";
nixConfig = {
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs"
];
};
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rustowl-flake.url = "github:nix-community/rustowl-flake";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
flake-utils,
fenix,
rustowl-flake,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
rustToolChain = fenix.packages.${system}.stable.toolchain;
in
{
formatter = pkgs.nixfmt-rfc-style;
devShells.default = with pkgs; mkShell {
buildInputs = [ rustowl-flake.packages.${system}.rustowl ];
packages = [ rustToolChain ];
};
}
);
}