jftt/flake.nix
2024-11-03 22:05:19 +01:00

40 lines
909 B
Nix

{
description = "jftt";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-analyzer-src.follows = "";
};
};
outputs = { nixpkgs, systems, fenix, ... }: let
name = "jftt";
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsForEach = nixpkgs.legacyPackages;
in {
devShells = forEachSystem (
system: let
pkgs = pkgsForEach.${system};
in {
default = pkgs.mkShell {
inherit name;
packages = with pkgs; [
rust-analyzer
(fenix.packages.${system}.complete.withComponents [
"cargo"
"rustc"
"rust-src"
])
flex
];
};
}
);
};
}