rust-nix-template/flake.nix

40 lines
1,004 B
Nix
Raw Normal View History

2021-04-07 00:17:50 +02:00
{
description = "bouncy";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
2021-04-07 05:25:05 +02:00
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
2021-04-07 00:17:50 +02:00
};
2021-04-07 05:25:05 +02:00
outputs = { self, nixpkgs, flake-utils, rust-overlay, flake-compat }:
flake-utils.lib.eachDefaultSystem
(system:
2021-04-07 00:17:50 +02:00
let pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlay ];
}; in
{
2021-04-07 00:17:50 +02:00
devShell = pkgs.mkShell {
nativeBuildInputs = [
(pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
"cargo"
"rustc"
"rls"
"rust-analysis"
"rustfmt"
"clippy"
];
})
2021-04-07 00:17:50 +02:00
];
};
}
);
}