{ description = "Build Project Archimedes"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; imgui = { url = "github:ocornut/imgui?ref=docking"; flake = false; }; clay = { url = "github:nicbarker/clay"; flake = false; }; }; outputs = { self, nixpkgs, imgui, clay }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { Archimedes = pkgs.stdenvNoCC.mkDerivation { name = "Archimedes"; src = ./.; #imgui = inputs.imgui; nativeBuildInputs = with pkgs; [ gcc ]; /*buildInputs = with pkgs; [ ];*/ buildPhase = '' g++ \ src/*.cpp \ -I src -I include -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; TestMenu = pkgs.stdenvNoCC.mkDerivation { name = "TestMenu"; src = ./.; nativeBuildInputs = with pkgs; [ gcc ]; buildPhase = '' g++ \ modules/TestMenu/src/*.cpp src/App.cpp \ -fpic -shared \ -I src \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; Print = pkgs.stdenvNoCC.mkDerivation { name = "Print"; src = ./.; nativeBuildInputs = with pkgs; [ gcc ]; buildPhase = '' g++ \ modules/Print/src/*.cpp src/App.cpp \ -fpic -shared \ -I src -I include \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; DependsOnPrint = pkgs.stdenvNoCC.mkDerivation { name = "DependsOnPrint"; src = ./.; nativeBuildInputs = with pkgs; [ gcc ]; buildPhase = '' g++ \ modules/DependsOnPrint/src/*.cpp src/App.cpp \ -fpic -shared \ -I src -I include \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; Window = pkgs.stdenvNoCC.mkDerivation { name = "Window"; src = ./.; nativeBuildInputs = with pkgs; [ gcc ]; buildInputs = with pkgs; [ glfw glew ]; buildPhase = '' g++ \ modules/Window/src/*.cpp modules/Window/src/WindowImpl/GLFW/*.cpp src/App.cpp \ -fpic -shared \ -I src -I include \ -I utils \ -lGL -lglfw -lGLEW \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; TestImgui = pkgs.stdenvNoCC.mkDerivation { name = "TestImgui"; src = ./.; inherit imgui; nativeBuildInputs = with pkgs; [ gcc ]; buildInputs = with pkgs; [ glfw ]; buildPhase = '' g++ \ modules/TestImgui/src/*.cpp src/App.cpp \ $imgui/backends/imgui_impl_glfw.cpp \ $imgui/backends/imgui_impl_opengl.cpp \ utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \ utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \ -DRENDERER_OPENGL \ -DWINDOW_GLFW \ -fpic -shared \ -I src -I include \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; TestClay = pkgs.stdenvNoCC.mkDerivation { name = "TestClay"; src = ./.; inherit clay; nativeBuildInputs = with pkgs; [ gcc ]; buildPhase = '' g++ \ modules/TestClay/src/*.cpp src/App.cpp \ -fpic -shared \ -I src -I include \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; MainGUI = pkgs.stdenvNoCC.mkDerivation { name = "MainGUI"; src = ./.; inherit imgui; nativeBuildInputs = with pkgs; [ gcc ]; buildPhase = '' g++ \ modules/MainGUI/src/*.cpp src/App.cpp \ -fpic -shared \ -I src -I include \ -I utils \ -Wall \ -o $name ''; installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; }; packages.${system}.default = self.Archimedes; }; }