now trying to build

This commit is contained in:
2025-03-14 15:06:27 -05:00
parent bc09e0d79b
commit a8dff07bf1
7 changed files with 86 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
{
description = "Build Project X-001";
description = "Build Project Archimedes";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
@@ -9,23 +9,21 @@
};
};
outputs = { self, nixpkgs, imgui }@inputs: let
outputs = { self, nixpkgs, imgui }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
packages.${system}.default = pkgs.stdenv.mkDerivation {
Archimedes = pkgs.stdenv.mkDerivation {
name = "Engine";
name = "Archimedes";
src = ./src;
imgui = inputs.imgui;
#imgui = inputs.imgui;
buildInputs = with pkgs; [
vulkan-headers
vulkan-loader
];
/*buildInputs = with pkgs; [
];*/
buildPhase = ''
g++ *.cpp -o $name
@@ -38,26 +36,48 @@
};
shaders = pkgs.stdenv.mkDerivation {
TestMenu = pkgs.stdenv.mkDerivation {
name = "Engine";
name = "TestMenu";
src = ./modules/shaders;
src = ./.;
buildInputs = with pkgs; [
shaderc
];
/*buildInputs = with pkgs; [
];*/
buildPhase = ''
glslc *.vert -o vert.spv
glslc *.frag -o frag.spv
'';
g++ modules/testMenu/src/*.cpp -fpic -shared -I src -o $name
'';
installPhase = ''
mkdir -p $out/bin
cp *.spv $out/bin
cp $name $out/bin
'';
};
Print = pkgs.stdenv.mkDerivation {
name = "Print";
src = ./.;
/*buildInputs = with pkgs; [
];*/
buildPhase = ''
g++ modules/print/src/*.cpp -fpic -shared -I src -I include -o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
packages.${system}.default = self.Archimedes;
};
}