nichts/templates/rust/flake.nix
fau 03067acb8d
apply statix lints
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696442c7de5f519287ef8b3d80668973ef48
2025-07-27 17:40:41 +02:00

36 lines
865 B
Nix

{
description = "Rust project template";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
};
outputs =
inputs:
let
inherit (inputs.nixpkgs) lib;
inherit (lib.attrsets) genAttrs mapAttrs;
eachSystem = genAttrs (import inputs.systems);
pkgsFor = inputs.nixpkgs.legacyPackages;
in
{
packages = eachSystem (system: {
default = inputs.self.packages.${system}.ralc;
ralc = pkgsFor.${system}.callPackage ./nix/package.nix { };
});
devShells = mapAttrs (_: pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
cargo
rustc
rustfmt
bacon
rust-analyzer
rustPackages.clippy
];
};
}) pkgsFor;
};
}