This commit is contained in:
2026-01-31 18:56:51 +01:00
parent 5900a8ad17
commit 354d3b707c

View File

@@ -1,5 +1,5 @@
{
description = "Odin devshell";
description = "Odin GA with plotting";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@@ -25,6 +25,29 @@
uiua-unstable
];
};
packages.default = pkgs.writeShellScriptBin "run-ga" ''
set -e
mkdir -p output
echo "Building Odin GA..."
odin build src -out:ga
echo "Running GA..."
./ga
echo "Generating plot..."
${pkgs.uiua-unstable}/bin/uiua src/plot.ua
echo "Done! Plot saved to output/plot.png"
rm ga
'';
apps.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/run-ga";
};
}
);
}