flake: emit Unity bundle zip; add Gitea Actions CI/release; publish VPM index
ci / build (push) Canceled after 0s

- flake.nix: install the libaac cdylib alongside aac-dump and zip it with
  the C# Unity packages as the default package
- .gitea/workflows: build+package on push/PR, publish release on v* tags
- vpm: commit the repository index and packaging script, with VPM_INDEX and
  VPM_INDEX_URL overrides for generating a local listing
This commit is contained in:
2026-09-19 16:07:43 +01:00
parent 2c3b670ab9
commit a1b81b8eb7
6 changed files with 257 additions and 4 deletions
+36 -4
View File
@@ -43,26 +43,58 @@
};
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
# Name Unity expects on the current platform; AacCrabNative.cs imports "libaac".
nativeLib =
if pkgs.stdenv.hostPlatform.isDarwin then
"libaac.dylib"
else if pkgs.stdenv.hostPlatform.isWindows then
"aac.dll"
else
"libaac.so";
# The Rust core: evaluates the Rhai DSL and emits the graph as JSON for Unity.
aac = craneLib.buildPackage {
src = ./rust;
strictDeps = true;
doCheck = true;
# crane's default install only copies binaries; install the cdylib explicitly.
installPhase = ''
runHook preInstall
mkdir -p $out/lib $out/bin
cp target/release/${nativeLib} $out/lib/
cp target/release/aac-dump $out/bin/
runHook postInstall
'';
};
# Unity-importable bundle: native library plus the C# packages, as a single zip.
bundle =
pkgs.runCommand "animator-as-crab-${system}.zip"
{
nativeBuildInputs = [ pkgs.zip ];
meta.description = "Unity plugin bundle for animator-as-crab";
}
''
mkdir -p root/Plugins root/bin
cp ${aac}/lib/${nativeLib} root/Plugins/
cp ${aac}/bin/aac-dump root/bin/
cp -r ${./csharp}/dev.doloro.animator-as-crab root/
cp -r ${./csharp}/dev.hai-vr.animator-as-code.v1.base.test root/
(cd root && zip -q -r $out .)
'';
in
{
packages = {
inherit aac;
default = aac;
inherit aac bundle;
default = bundle;
};
devShells.default = craneLib.devShell {
inputsFrom = [ aac ];
packages = [
rustToolchain
pkgs.dotnet-sdk
pkgs.mono
pkgs.jq
pkgs.zip
];
};