Something went wrong. Try again.
Windows, a GPU renderer and text for Zig programs that draw their own interface.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ description = "zig-aerie: windows, a GPU renderer and text for Zig programs that draw their own interface";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; # Turns build.zig.zon into build.zig.zon.nix, so that the Zig # dependencies are fetched by Nix rather than by a sandboxed `zig build`. zon2nix = { url = "git+https://git.jcollie.dev/jeff/zon2nix.git"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, zon2nix, ... }: let inherit (nixpkgs) lib; # Linux only: Wayland is the one platform zig-aerie has. linuxSystems = builtins.filter ( system: (lib.systems.elaborate system).isLinux ) lib.systems.flakeExposed; makePackages = system: import nixpkgs { inherit system; }; forAllSystems = lib.genAttrs linuxSystems; in { packages = forAllSystems ( system: let pkgs = makePackages system; in { # The Zig dependencies on their own, for a job that runs `zig build`. zig-deps = pkgs.callPackage ./build.zig.zon.nix { }; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "zig-aerie"; # The Vulkan loader is opened at run time, and the validation # layer is found through its manifest. LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.vulkan-loader ]; VK_ADD_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; nativeBuildInputs = [ pkgs.zig_0_17 # spirv-val and spirv-dis, for checking the shaders. pkgs.spirv-tools pkgs.vulkan-loader pkgs.vulkan-validation-layers pkgs.vulkan-tools pkgs.git-pages-cli pkgs.reuse # Regenerates build.zig.zon.nix: # zon2nix --17 --nix=build.zig.zon.nix build.zig.zon # It runs `zig env`, so it is wrapped to find this Zig. (pkgs.symlinkJoin { name = "zon2nix"; paths = [ zon2nix.packages.${system}.zon2nix ]; nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/zon2nix \ --prefix PATH : ${lib.makeBinPath [ pkgs.zig_0_17 ]} ''; }) ] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.kcov pkgs.perf ]; }; } ); };}