{ description = "Build Project X-001"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; imgui = { url = "github:ocornut/imgui?ref=docking"; flake = false; }; }; outputs = { self, nixpkgs, imgui }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { packages.${system}.default = pkgs.stdenv.mkDerivation { name = "Engine"; src = ./src; imgui = inputs.imgui; buildInputs = with pkgs; [ vulkan-headers vulkan-loader ]; buildPhase = '' g++ *.cpp -o $name ''; installPhase = '' mkdir -p $out/bin cp *.spv $out/bin cp $name $out/bin ''; }; shaders = pkgs.stdenv.mkDerivation { name = "Engine"; src = ./modules/shaders; buildInputs = with pkgs; [ shaderc ]; buildPhase = '' glslc *.vert -o vert.spv glslc *.frag -o frag.spv ''; installPhase = '' mkdir -p $out/bin cp *.spv $out/bin ''; }; }; }