{ description = "A simple bit rot checker"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; naersk = { url = "github:nix-community/naersk"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, flake-parts, naersk, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; perSystem = { pkgs, system, ... }: let naersk' = pkgs.callPackage naersk { }; in rec { # nix build # nix run . -- --help packages.default = packages.brck; # nix build .#brck # nix run .#brck -- --help packages.brck = naersk'.buildPackage { name = "brck"; src = builtins.path { path = ./.; name = "brck"; }; meta.mainProgram = "brck"; }; # nix develop devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc cargo rustfmt clippy cargo-audit cargo-edit rust-analyzer ]; }; # nix fmt formatter = pkgs.nixfmt-tree; }; }; }