devshells/flake.nix
2025-08-13 16:20:15 +02:00

48 lines
1001 B
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
defaultSystems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
forAllDefaultSystems = f: nixpkgs.lib.genAttrs defaultSystems (system: f system);
in
{
devShells = forAllDefaultSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
#default = self.devShells."${system}".;
tex = pkgs.mkShell {
buildInputs = with pkgs; [
texliveSmall
];
};
rust = pkgs.mkShell {
buildInputs = with pkgs; [
rustc
cargo
gcc
rustfmt
clippy
];
};
}
);
formatter = forAllDefaultSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree);
};
}