38 lines
928 B
Nix
38 lines
928 B
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
nixGL.url = "github:guibou/nixGL";
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, fenix, nixGL }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = (import nixpkgs) {
|
|
inherit system;
|
|
|
|
overlays = [ nixGL.overlay fenix.overlays.default ];
|
|
};
|
|
|
|
toolchain = fenix.packages.x86_64-linux.minimal.toolchain;
|
|
in {
|
|
devShell = with pkgs;
|
|
mkShell rec {
|
|
nativeBuildInputs = [
|
|
(pkgs.fenix.complete.withComponents [
|
|
"cargo"
|
|
"clippy"
|
|
"rust-src"
|
|
"rustc"
|
|
"rustfmt"
|
|
])
|
|
pkgs.rust-analyzer
|
|
];
|
|
};
|
|
});
|
|
}
|