{ description = "A monorepo for young ideas that are not yet fully grown"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { nixpkgs, ... }: let systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); in { devShells = forAllSystems ( pkgs: let # Libraries that winit and wgpu load at runtime (via `dlopen`), so # they need to be on the library path rather than linked. runtimeLibraries = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux ( with pkgs; [ # X11 libx11 libxcursor libxi libxrandr libxcb # Wayland wayland libxkbcommon # Fonts fontconfig # GPU vulkan-loader libGL ] ); in { # Rust itself comes from rustup, pinned by `rust-toolchain.toml`. default = pkgs.mkShell { packages = [ pkgs.rustup ]; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath runtimeLibraries; }; } ); formatter = forAllSystems (pkgs: pkgs.nixfmt); }; }