flake parts

This commit is contained in:
2026-02-14 17:08:36 -06:00
parent f01bd49fb1
commit d6f8036175
17 changed files with 707 additions and 638 deletions

View File

@@ -0,0 +1,50 @@
{ inputs, ... }: {
perSystem = { system, pkgs, self', ... }: {
packages.Calculator = pkgs.stdenvNoCC.mkDerivation {
name = "Calculator";
src = inputs.src;
imgui = inputs.imgui;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
glfw
glew
];
buildPhase = ''
clang++ \
modules/Archimedes-Modules/Calculator/*.cpp \
modules/WindowModule/*.cpp \
modules/ImguiModule/*.cpp \
$imgui/backends/imgui_impl_glfw.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \
$imgui/misc/cpp/*.cpp \
$imgui/*.cpp \
-DRENDERER=1 \
-DWINDOW=1 \
-DCALCULATOR_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
};
}