Files
Archimedes/flake.nix
2025-03-14 15:06:27 -05:00

84 lines
1.7 KiB
Nix
Executable File

{
description = "Build Project Archimedes";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
imgui = {
url = "github:ocornut/imgui?ref=docking";
flake = false;
};
};
outputs = { self, nixpkgs, imgui }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
Archimedes = pkgs.stdenv.mkDerivation {
name = "Archimedes";
src = ./src;
#imgui = inputs.imgui;
/*buildInputs = with pkgs; [
];*/
buildPhase = ''
g++ *.cpp -o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
TestMenu = pkgs.stdenv.mkDerivation {
name = "TestMenu";
src = ./.;
/*buildInputs = with pkgs; [
];*/
buildPhase = ''
g++ modules/testMenu/src/*.cpp -fpic -shared -I src -o $name
'';
installPhase = ''
mkdir -p $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;
};
}