{ description = "Description for the project"; inputs = { devenv-root = { url = "file+file:///dev/null"; flake = false; }; nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; 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/monthly"; fenix.inputs.nixpkgs.follows = "nixpkgs"; }; nixConfig = { extra-trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; extra-substituters = [ "https://devenv.cachix.org" "https://nix-community.cachix.org" ]; }; outputs = inputs@{ flake-parts, devenv-root, ... }: flake-parts.lib.mkFlake { inherit inputs; } { imports = [ inputs.devenv.flakeModule ]; systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; perSystem = { config, self', inputs', pkgs, system, ... }: { devenv.shells.default = let fnx = inputs'.fenix.packages; rustToolchain = fnx.beta.toolchain; # rustToolchain = fnx.combine [ # fnx.complete.cargo # fnx.complete.clippy # fnx.complete.rust-src # fnx.complete.rustc # fnx.complete.rustfmt # ]; in { name = "my-project"; packages = [ pkgs.dioxus-cli pkgs.cargo-expand pkgs.cargo-deny pkgs.cargo-nextest pkgs.typos rustToolchain fnx.rust-analyzer ]; scripts.checkall.exec = '' set -xeuo pipefail cargo clippy --workspace --all-targets --all-features -- -D warnings cargo deny check all -D warnings cargo fmt --all -- --check cargo nextest run --workspace --all-targets --all-features --status-level all cargo test ''; # DO NOT ENABLE RUST because devenv messes up the ability # to build rust-src # languages.rust = {}; }; }; flake = { }; }; }