{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nix-gleam = { url = "github:arnarg/nix-gleam"; inputs.nixpkgs.follows = "nixpkgs"; }; gomod2nix = { url = "github:nix-community/gomod2nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { nixpkgs, nix-gleam, gomod2nix, ... }: let lib = nixpkgs.lib; supportedSystems = lib.systems.flakeExposed; forEachSupportedSystem = f: lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs {inherit system;}; inherit system; }); in { devShells = forEachSupportedSystem ({ pkgs, system, ... }: { default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ gleam beamMinimal28Packages.erlang beamMinimal28Packages.rebar3 bun go gopls gomod2nix.legacyPackages.${system}.gomod2nix ]; }; }); packages = forEachSupportedSystem ({ pkgs, system, ... }: { docs = pkgs.callPackage ./nix/packages/docs.nix { inherit (nix-gleam.packages.${system}) buildGleamApplication; }; kivia = pkgs.callPackage ./nix/packages/kivia/package.nix { inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; }; }); }; }