{ outputs = { self, nixpkgs, }: let supportedSystems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); in { packages = forAllSystems (system: let pkgs = nixpkgsFor."${system}"; in { default = pkgs.stdenv.mkDerivation { pname = "tinysub"; version = "0.1.0"; src = ./.; nativeBuildInputs = with pkgs; [ monolith ]; buildPhase = '' runHook preBuild monolith src/index.html -o index.html runHook postBuild ''; installPhase = '' runHook preInstall mkdir -p $out cp index.html $out/ runHook postInstall ''; }; }); formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra); devShells = forAllSystems (system: let pkgs = nixpkgsFor."${system}"; in { default = pkgs.mkShell { packages = with pkgs; [ nodejs pnpm prettier ]; }; }); overlays.default = final: prev: { tinysub = self.packages.${final.system}.default; }; }; }