update flake.nix
This commit is contained in:
93
flake.nix
93
flake.nix
@@ -14,7 +14,7 @@
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
|
||||
Archimedes = pkgs.stdenv.mkDerivation {
|
||||
Archimedes = pkgs.stdenvNoCC.mkDerivation {
|
||||
|
||||
name = "Archimedes";
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
|
||||
#imgui = inputs.imgui;
|
||||
|
||||
/*buildInputs = with pkgs; [
|
||||
];*/
|
||||
NativeBuildInputs = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
g++ *.cpp -o $name
|
||||
g++ \
|
||||
*.cpp \
|
||||
-o $name
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@@ -36,17 +39,22 @@
|
||||
|
||||
};
|
||||
|
||||
TestMenu = pkgs.stdenv.mkDerivation {
|
||||
TestMenu = pkgs.stdenvNoCC.mkDerivation {
|
||||
|
||||
name = "TestMenu";
|
||||
|
||||
src = ./.;
|
||||
|
||||
/*buildInputs = with pkgs; [
|
||||
];*/
|
||||
NativeBuildInputs = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
|
||||
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 = ''
|
||||
@@ -56,17 +64,78 @@
|
||||
|
||||
};
|
||||
|
||||
Print = pkgs.stdenv.mkDerivation {
|
||||
Print = pkgs.stdenvNoCC.mkDerivation {
|
||||
|
||||
name = "Print";
|
||||
|
||||
src = ./.;
|
||||
|
||||
/*buildInputs = with pkgs; [
|
||||
];*/
|
||||
NativeBuildInputs = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
|
||||
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 = ''
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 940 KiB |
@@ -1,4 +1,4 @@
|
||||
#include "../../../include/Archimedes.h"
|
||||
#include "Archimedes.h"
|
||||
|
||||
class TestMenu : public Module {
|
||||
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
#include "Archimedes.h"
|
||||
#include "windowGLFW.h"
|
||||
|
||||
|
||||
Window::Window() {
|
||||
if(!glfwInit())
|
||||
if(!glfwInit()) {
|
||||
std::cout << "glfwInit failed!\n";
|
||||
std::abort();
|
||||
}
|
||||
w = glfwCreateWindow(640, 480, "Archimedes", NULL, NULL);
|
||||
}
|
||||
|
||||
bool Window::close() {
|
||||
return glfwShouldClose(w);
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ class Window {
|
||||
Window();
|
||||
~Window();
|
||||
|
||||
bool close();
|
||||
|
||||
private:
|
||||
GLFWwindow* w;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
|
||||
|
||||
class WindowImpl {};
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "../../../include/Archimedes.h"
|
||||
#include "Archimedes.h"
|
||||
#include "WindowImpl/WindowImpl.h"
|
||||
#include "Renderer/Renderer.h"
|
||||
|
||||
class WindowModule : Module {
|
||||
class WindowModule : public Module {
|
||||
|
||||
public:
|
||||
WindowModule(void*, App&);
|
||||
|
||||
Reference in New Issue
Block a user