This commit is contained in:
2025-04-17 17:28:47 -05:00
parent a1e9401aaa
commit a79f40c66c
8 changed files with 135 additions and 4 deletions

View File

@@ -58,6 +58,7 @@
'';
};
Print = pkgs.stdenvNoCC.mkDerivation {
name = "Print";
@@ -168,7 +169,6 @@
$imgui/*.cpp \
-DRENDERER_OPENGL \
-DWINDOW_GLFW \
-DGUIMODULE \
-DTESTIMGUI_DYNAMIC \
-fpic -shared \
-I src -I include -I $imgui -I . \
@@ -214,4 +214,83 @@
'';
};
ChatServer = pkgs.stdenvNoCC.mkDerivation {
name = "ChatServer";
src = ./.;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
gamenetworkingsockets
];
buildPhase = ''
clang++ \
modules/examples/ChatServer/src/*.cpp \
modules/ServerModule/src/*.cpp \
-fpic -shared \
-I src -I include \
-I ${pkgs.gamenetworkingsockets}/include/GameNetworkingSockets \
-lGameNetworkingSockets \
-DCHATSERVER_DYNAMIC \
-Wall \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
ChatClient = pkgs.stdenvNoCC.mkDerivation {
name = "ChatClient";
src = ./.;
imgui = inputs.imgui;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
gamenetworkingsockets
];
buildPhase = ''
clang++ \
modules/examples/ChatClient/src/*.cpp \
modules/ClientModule/src/*.cpp \
-I ${pkgs.gamenetworkingsockets}/include/GameNetworkingSockets \
-lGameNetworkingSockets \
-DCLIENTMODULE_DYNAMIC \
modules/WindowModule/src/*.cpp \
modules/ImguiModule/src/*.cpp \
$imgui/backends/imgui_impl_glfw.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \
$imgui/misc/cpp/*.cpp \
$imgui/*.cpp \
-DRENDERER_OPENGL \
-DWINDOW_GLFW \
-fpic -shared \
-I src -I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-Wall \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
}