{ description = "A Nix flake for building the fast-p Go binary"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; }; outputs = { self, nixpkgs }: let # Support multiple systems supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; # Helper function to generate outputs for each system forEachSystem = f: nixpkgs.lib.genAttrs supportedSystems ( system: f { inherit system; pkgs = nixpkgs.legacyPackages.${system}; } ); in { packages = forEachSystem ( { system, pkgs }: { default = pkgs.buildGoModule { pname = "fast-p"; version = "0.1.0"; src = ./.; vendorHash = "sha256-/lKWY6NZrw8aGe1/R2jspT4EZQxAxP0ujckpwZQGn2w="; # Run `nix build` to get actual hash }; } ); devShells = forEachSystem ( { pkgs, ... }: { default = pkgs.mkShell { packages = with pkgs; [ go ]; }; } ); }; }