Core program should have no* dependencies

This commit is contained in:
2025-03-26 13:45:08 -05:00
parent fd6a774c73
commit 27750c8a28

View File

@@ -25,23 +25,16 @@
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildInputs = with pkgs; [ /*buildInputs = with pkgs; [
glfw ];*/
glew
];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
src/*.cpp \ src/*.cpp \
utils/Window/*.cpp \ -I src -I include \
utils/Renderer/*.cpp \
-I src -I include -I utils \
-DRENDERER_OPENGL \
-DWINDOW_GLFW \
-lGL -lglfw -lGLEW \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -60,15 +53,14 @@
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/TestMenu/src/*.cpp src/App.cpp \ modules/TestMenu/src/*.cpp src/App.cpp \
-fpic -shared \ -fpic -shared \
-I src \ -I src \
-I utils \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -87,15 +79,14 @@
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/Print/src/*.cpp src/App.cpp \ modules/Print/src/*.cpp src/App.cpp \
-fpic -shared \ -fpic -shared \
-I src -I include \ -I src -I include \
-I utils \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -114,15 +105,14 @@
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/DependsOnPrint/src/*.cpp src/App.cpp \ modules/DependsOnPrint/src/*.cpp src/App.cpp \
-fpic -shared \ -fpic -shared \
-I src -I include \ -I src -I include \
-I utils \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -141,7 +131,7 @@
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@@ -150,12 +140,12 @@
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/Window/src/*.cpp src/App.cpp \ modules/Window/src/*.cpp src/App.cpp \
utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \ utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \
utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \ utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \
-fpic -shared \ -fpic -shared \
-I src -I include -I utils \ -I src -I include \
-DRENDERER_OPENGL \ -DRENDERER_OPENGL \
-DWINDOW_GLFW \ -DWINDOW_GLFW \
-lGL -lglfw -lGLEW \ -lGL -lglfw -lGLEW \
@@ -179,7 +169,7 @@
inherit imgui; inherit imgui;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@@ -188,17 +178,17 @@
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/GUImodules/TestImgui/src/*.cpp src/App.cpp \ modules/GUImodules/TestImgui/src/*.cpp src/App.cpp \
$imgui/backends/imgui_impl_glfw.cpp \ $imgui/backends/imgui_impl_glfw.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \ $imgui/backends/imgui_impl_opengl3.cpp \
$imgui/*.cpp \ $imgui/*.cpp \
utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \ utils/Renderer/*.cpp \
utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \ utils/Window/*.cpp \
-DRENDERER_OPENGL \ -DRENDERER_OPENGL \
-DWINDOW_GLFW \ -DWINDOW_GLFW \
-fpic -shared \ -fpic -shared \
-I src -I include -I utils -I $imgui \ -I src -I include -I $imgui \
-lGL -lglfw -lGLEW \ -lGL -lglfw -lGLEW \
-Wall \ -Wall \
-o $name -o $name
@@ -220,17 +210,16 @@
inherit clay; inherit clay;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/TestClay/src/*.cpp src/App.cpp \ modules/TestClay/src/*.cpp src/App.cpp \
-fpic -shared \ -fpic -shared \
-I src -I include \ -I src -I include \
-DRENDERER_OPENGL \ -DRENDERER_OPENGL \
-DWINDOW_GLFW \ -DWINDOW_GLFW \
-I utils \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -251,15 +240,14 @@
inherit imgui; inherit imgui;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
gcc clang
]; ];
buildPhase = '' buildPhase = ''
g++ \ clang++ \
modules/MainGUI/src/*.cpp src/App.cpp \ modules/MainGUI/src/*.cpp src/App.cpp \
-fpic -shared \ -fpic -shared \
-I src -I include \ -I src -I include \
-I utils \
-Wall \ -Wall \
-o $name -o $name
''; '';
@@ -276,7 +264,7 @@
apps.${system}.default = { apps.${system}.default = {
type = "app"; type = "app";
program = "${pkgs.writeShellScriptBin "RunArchimedes" "${self.Archimedes}/bin/Archimedes ${self.TestImgui}/bin/TestImgui"}"; program = "${self.Archimedes}/bin/Archimedes";
}; };
}; };