{ description = "Minimal Gio (gioui.org) development environment with Go support"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem ( system: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; gioDeps = with pkgs; [ go gopls git pkg-config # X11 + Wayland deps xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXinerama xorg.libXi xorg.libXext libGL wayland wayland-protocols libxkbcommon # Text rendering cairo pango harfbuzz freetype fontconfig ]; in { devShells.default = pkgs.mkShell { name = "gio-dev"; packages = gioDeps; shellHook = '' export CGO_ENABLED=1 export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPath "lib/pkgconfig" gioDeps} export GIO_USE_WAYLAND=1 echo "✅ Gio development shell ready." echo "Run 'go run .' to start your app." ''; }; apps.default = { type = "app"; program = "${pkgs.go}/bin/go run ."; }; } ); }