This commit is contained in:
2025-04-11 07:37:15 -05:00
parent ead1e0c90e
commit 8f62957886
3 changed files with 87 additions and 36 deletions

111
flake.nix
View File

@@ -62,46 +62,45 @@
ImguiModule = pkgs.stdenvNoCC.mkDerivation {
name = "ImguiModule";
name = "ImguiModule";
src = ./.;
src = ./.;
imgui = inputs.imgui;
imgui = inputs.imgui;
nativeBuildInputs = with pkgs; [
clang
];
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
glfw
glew
];
buildInputs = with pkgs; [
glfw
glew
];
buildPhase = ''
clang++ \
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_OPENGL \
-DWINDOW_GLFW \
-DIMGUIMODULE_DYNAMIC \
-fpic -shared \
-I src -I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-Wall \
-o $name
'';
buildPhase = ''
clang++ \
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_OPENGL \
-DWINDOW_GLFW \
-DIMGUIMODULE_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
'';
};
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
MainGUI = pkgs.stdenvNoCC.mkDerivation {
@@ -145,6 +144,52 @@
'';
};
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_OPENGL \
-DWINDOW_GLFW \
-DMAINGUI_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
'';
};
};