shity basic one shot

This commit is contained in:
2026-09-18 14:01:10 +01:00
parent 5851077659
commit 42a1234e7f
81 changed files with 3484 additions and 76 deletions
+77
View File
@@ -0,0 +1,77 @@
{
description = "animator-as-crab: Animator Controllers described in Rhai, generated from Rust into Unity";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
crane.url = "github:ipetkov/crane";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
crane,
rust-overlay,
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
perSystem =
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
"rustfmt"
];
};
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
# The Rust core: evaluates the Rhai DSL and emits the graph as JSON for Unity.
aac = craneLib.buildPackage {
src = ./rust;
strictDeps = true;
doCheck = true;
};
in
{
packages = {
inherit aac;
default = aac;
};
devShells.default = craneLib.devShell {
inputsFrom = [ aac ];
packages = [
rustToolchain
pkgs.dotnet-sdk
pkgs.mono
pkgs.jq
];
};
formatter = pkgs.nixfmt-rfc-style;
};
in
{
packages = forAllSystems (system: (perSystem system).packages);
devShells = forAllSystems (system: (perSystem system).devShells);
formatter = forAllSystems (system: (perSystem system).formatter);
};
}