{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
devenv.url = "github:cachix/devenv";
nix2container.url = "github:nlewo/nix2container";
nix2container.inputs.nixpkgs.follows = "nixpkgs";
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
];
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devenv.shells.default = {
packages = with pkgs; [ cargo openjdk_headless ];
languages.rust.enable = true;
languages.rust.version = "latest"; # to support rustfmt ignore config
pre-commit.hooks = {
clippy.enable = true;
rustfmt.enable = true;
};
pre-commit.settings.clippy.offline = false;
};
};
};
}