{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; }; outputs = { self, nixpkgs, utils, naersk }: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; naersk-lib = naersk.lib."${system}"; in rec { # `nix build` packages.zat = naersk-lib.buildPackage { pname = "zat"; root = ./.; }; defaultPackage = packages.zat; # `nix run` apps.zat = utils.lib.mkApp { drv = packages.zat; }; defaultApp = apps.zat; # `nix develop` devShell = pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc cargo ]; }; }); }