flake parts
This commit is contained in:
53
src/example_apps/ImguiEmbed/default.nix
Normal file
53
src/example_apps/ImguiEmbed/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
perSystem = { system, pkgs, self', ... }: {
|
||||
packages.exampleApps_ImguiEmbed = pkgs.stdenvNoCC.mkDerivation {
|
||||
|
||||
name = "Archimedes";
|
||||
|
||||
src = inputs.src;
|
||||
|
||||
imgui = inputs.imgui;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
clang
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
glfw
|
||||
glew
|
||||
|
||||
glm
|
||||
nlohmann_json
|
||||
curl
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
clang++ \
|
||||
$src/src/example_apps/ImguiEmbed/*.cpp \
|
||||
$src/modules/MainGUI/*.cpp \
|
||||
$src/modules/WindowModule/*.cpp \
|
||||
$src/modules/ImguiModule/*.cpp \
|
||||
$imgui/backends/imgui_impl_glfw.cpp \
|
||||
$imgui/backends/imgui_impl_opengl3.cpp \
|
||||
$imgui/misc/cpp/*.cpp \
|
||||
$imgui/*.cpp \
|
||||
-DRENDERER_OPENGL=1 \
|
||||
-DWINDOW_GLFW=1 \
|
||||
-I $src/include -I $imgui -I $src \
|
||||
-lEGL -lGL -lglfw -lGLEW \
|
||||
$(curl-config --cflags) \
|
||||
$(curl-config --libs) \
|
||||
-Wall \
|
||||
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $name $out/bin
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user