update flake.nix

This commit is contained in:
2025-03-16 20:04:46 -05:00
parent cec2adec97
commit 659a2690f1
8 changed files with 98 additions and 16073 deletions

View File

@@ -14,7 +14,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in { in {
Archimedes = pkgs.stdenv.mkDerivation { Archimedes = pkgs.stdenvNoCC.mkDerivation {
name = "Archimedes"; name = "Archimedes";
@@ -22,11 +22,14 @@
#imgui = inputs.imgui; #imgui = inputs.imgui;
/*buildInputs = with pkgs; [ NativeBuildInputs = with pkgs; [
];*/ gcc
];
buildPhase = '' buildPhase = ''
g++ *.cpp -o $name g++ \
*.cpp \
-o $name
''; '';
installPhase = '' installPhase = ''
@@ -36,17 +39,22 @@
}; };
TestMenu = pkgs.stdenv.mkDerivation { TestMenu = pkgs.stdenvNoCC.mkDerivation {
name = "TestMenu"; name = "TestMenu";
src = ./.; src = ./.;
/*buildInputs = with pkgs; [ NativeBuildInputs = with pkgs; [
];*/ gcc
];
buildPhase = '' buildPhase = ''
g++ modules/testMenu/src/*.cpp src/App.cpp -fpic -shared -I src -o $name g++ \
modules/TestMenu/src/*.cpp src/App.cpp \
-fpic -shared \
-I src \
-o $name
''; '';
installPhase = '' installPhase = ''
@@ -56,17 +64,78 @@
}; };
Print = pkgs.stdenv.mkDerivation { Print = pkgs.stdenvNoCC.mkDerivation {
name = "Print"; name = "Print";
src = ./.; src = ./.;
/*buildInputs = with pkgs; [ NativeBuildInputs = with pkgs; [
];*/ gcc
];
buildPhase = '' buildPhase = ''
g++ modules/print/src/*.cpp src/App.cpp -fpic -shared -I src -I include -o $name g++ \
modules/Print/src/*.cpp src/App.cpp \
-fpic -shared \
-I src -I include \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
Window = pkgs.stdenvNoCC.mkDerivation {
name = "Window";
src = ./.;
NativeBuildInputs = with pkgs; [
gcc
];
buildInputs = with pkgs; [
glfw
];
buildPhase = ''
g++ \
modules/Window/src/*.cpp src/App.cpp \
-fpic -shared \
-I src -I include \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
MainGUI = pkgs.stdenvNoCC.mkDerivation {
name = "MainGUI";
src = ./.;
inherit imgui;
NativeBuildInputs = with pkgs; [
gcc
];
buildPhase = ''
g++ \
modules/MainGUI/src/*.cpp src/App.cpp \
-fpic -shared \
-I src -I include \
-o $name
''; '';
installPhase = '' installPhase = ''

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 KiB

View File

@@ -1,4 +1,4 @@
#include "../../../include/Archimedes.h" #include "Archimedes.h"
class TestMenu : public Module { class TestMenu : public Module {

View File

@@ -1,7 +1,19 @@
#include "Archimedes.h"
#include "windowGLFW.h" #include "windowGLFW.h"
Window::Window() { Window::Window() {
if(!glfwInit()) if(!glfwInit()) {
std::cout << "glfwInit failed!\n"; std::cout << "glfwInit failed!\n";
std::abort();
}
w = glfwCreateWindow(640, 480, "Archimedes", NULL, NULL);
}
bool Window::close() {
return glfwShouldClose(w);
}
Window::~Window() {
} }

View File

@@ -8,6 +8,7 @@ class Window {
Window(); Window();
~Window(); ~Window();
bool close();
private: private:
GLFWwindow* w; GLFWwindow* w;

View File

@@ -1,4 +0,0 @@
class WindowImpl {};

View File

@@ -1,8 +1,8 @@
#include "../../../include/Archimedes.h" #include "Archimedes.h"
#include "WindowImpl/WindowImpl.h" #include "WindowImpl/WindowImpl.h"
#include "Renderer/Renderer.h" #include "Renderer/Renderer.h"
class WindowModule : Module { class WindowModule : public Module {
public: public:
WindowModule(void*, App&); WindowModule(void*, App&);