diff --git a/ExampleModules.nix b/ExampleModules.nix index d5a6813..d078c37 100644 --- a/ExampleModules.nix +++ b/ExampleModules.nix @@ -183,6 +183,49 @@ }; + Calculator = pkgs.stdenvNoCC.mkDerivation { + + name = "Calculator"; + + src = ./.; + + imgui = inputs.imgui; + + nativeBuildInputs = with pkgs; [ + clang + ]; + + buildInputs = with pkgs; [ + glfw + glew + ]; + + buildPhase = '' + clang++ \ + ${inputs.Archimedes-Modules}/Calculator/*.cpp \ + modules/WindowModule/*.cpp \ + modules/ImguiModule/*.cpp \ + $imgui/backends/imgui_impl_glfw.cpp \ + $imgui/backends/imgui_impl_opengl3.cpp \ + $imgui/misc/cpp/*.cpp \ + $imgui/*.cpp \ + -DRENDERER=1 \ + -DWINDOW=1 \ + -DCALCULATOR_DYNAMIC \ + -fpic -shared \ + -I include -I $imgui -I . \ + -lGL -lglfw -lGLEW \ + -Wall \ + -o $name + ''; + + installPhase = '' + mkdir -p $out/bin + cp $name $out/bin + ''; + + }; + TestClay = pkgs.stdenvNoCC.mkDerivation { name = "TestClay";