{ description = "T3 Code packages for Nix"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; t3code = { url = "github:pingdotgg/t3code"; flake = false; }; }; outputs = { self, nixpkgs, t3code, ... }: let lib = nixpkgs.lib; systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = lib.genAttrs systems; in { packages = forAllSystems ( system: let pkgs = import nixpkgs {inherit system;}; t3 = pkgs.callPackage ./packages/server-package.nix {src = t3code;}; in { inherit t3; t3code = t3; default = t3; } // lib.optionalAttrs (system == "x86_64-linux") { t3code-desktop = pkgs.callPackage ./packages/desktop-package.nix {src = t3code;}; } ); apps = forAllSystems (system: { default = { type = "app"; program = "${self.packages.${system}.t3}/bin/t3"; }; t3 = { type = "app"; program = "${self.packages.${system}.t3}/bin/t3"; }; }); checks = forAllSystems ( system: { t3 = self.packages.${system}.t3; } // lib.optionalAttrs (system == "x86_64-linux") { t3code-desktop = self.packages.${system}.t3code-desktop; } ); }; }