{ inputs.nixpkgs.url = "nixpkgs"; outputs = { self, nixpkgs, ... }: let version = builtins.substring 0 7 self.lastModifiedDate; systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs systems; nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); packageFn = pkgs: pkgs.rustPlatform.buildRustPackage { pname = "e4vc"; inherit version; src = builtins.path { name = "source"; path = ./.; }; cargoSha256 = "sha256-6aA95Zm1FGp8xiv55QSBZFfmBXWz5pygc/8uQHvy3tM="; }; in rec { packages = forAllSystems (s: let pkgs = nixpkgsFor.${s}; in rec { e4vc = packageFn pkgs; default = e4vc; }); devShells = forAllSystems (s: let pkgs = nixpkgsFor.${s}; inherit (pkgs) mkShell; in { default = mkShell { packages = with pkgs; [rustc cargo rustfmt]; }; }); dockerImage = forAllSystems (s: let pkgs = nixpkgsFor.${s}; in pkgs.dockerTools.buildImage { name = "e4vc"; tag = "latest"; config = { Cmd = ["${packageFn pkgs}/bin/e4vc"]; }; }); }; }