build
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user