add extra modules as git submodule
This commit is contained in:
101
flake.nix
101
flake.nix
@@ -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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user