add extra modules as git submodule

This commit is contained in:
2025-05-11 19:17:33 -05:00
parent cb56bd302d
commit ec4b85587b
4 changed files with 113 additions and 108 deletions

101
flake.nix
View File

@@ -168,6 +168,7 @@
'';
};
MainGUIsdl = pkgs.stdenvNoCC.mkDerivation {
name = "MainGUI";
@@ -254,105 +255,13 @@
};
Terminal = pkgs.stdenvNoCC.mkDerivation {
name = "Terminal";
src = ./.;
inherit imgui;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
glfw
glew
];
buildPhase = ''
clang++ \
modules/Terminal/src/*.cpp \
modules/ImguiModule/src/*.cpp \
modules/WindowModule/src/*.cpp \
$imgui/backends/imgui_impl_glfw.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \
$imgui/misc/cpp/*.cpp \
$imgui/*.cpp \
-DRENDERER=1 \
-DWINDOW=1 \
-DTERMINAL_DYNAMIC \
-fpic -shared \
-I src -I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-Wall \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
packages.${system}.default = self.Archimedes.examples.MinimalApp;
apps.${system}.default = {
type = "app";
program = "${self.Archimedes.examples.MinimalApp}/bin/Archimedes";
};
Ollama = pkgs.stdenvNoCC.mkDerivation {
name = "Ollama";
src = ./.;
inherit imgui;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
glfw
glew
curl
nlohmann_json
];
buildPhase = ''
clang++ \
modules/Ollama/src/*.cpp \
modules/ImguiModule/src/*.cpp \
modules/WindowModule/src/*.cpp \
$imgui/backends/imgui_impl_glfw.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \
$imgui/misc/cpp/*.cpp \
$imgui/*.cpp \
-DRENDERER=1 \
-DWINDOW=1 \
-DOLLAMA_DYNAMIC \
-fpic -shared \
-I src -I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
$(curl-config --cflags) \
$(curl-config --libs) \
-Wall \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
};
packages.${system}.default = self.Archimedes.examples.MinimalApp;
apps.${system}.default = {
type = "app";
program = "${self.Archimedes.examples.MinimalApp}/bin/Archimedes";
};
};