Files
moeka-project/nix/common.nix
T
Weathercold d9dd2862e9 chore(ci): Remove CI concurrency group & small fixes (#1758)
## Description

<!-- Please insert your description here and especially provide info
about the "what" this PR is solving -->

It has no effect. The actions are run in parallel anyway. They have been
previously updated to not fail when run in parallel.

## Linked Issues

<!-- Optional, if you have any -->

## Additional Context

<!-- e.g. is there anything you'd like reviewers to focus on? -->
2026-05-04 06:37:35 +08:00

95 lines
2.4 KiB
Nix

{
lib,
stdenvNoCC,
fetchPnpmDeps,
pnpm_10,
pnpmConfigHook,
cacert,
gitMinimal,
nodejs,
}:
stdenvNoCC.mkDerivation (final: {
pname = "airi";
version = (builtins.fromJSON (builtins.readFile ../package.json)).version;
src = lib.cleanSourceWith {
src = ../.;
filter =
path: type:
let
baseName = baseNameOf (toString path);
isEditorMetadataDirectory = type == "directory" && (baseName == ".vscode" || baseName == ".zed");
in
!isEditorMetadataDirectory;
};
pnpmDeps = fetchPnpmDeps {
inherit (final) pname version src;
fetcherVersion = 3;
hash = builtins.readFile ./pnpm-deps-hash.txt;
};
# Cache of assets downloaded during vite build
assets = stdenvNoCC.mkDerivation {
pname = "airi-assets";
inherit (final) version src pnpmDeps;
nativeBuildInputs = [
cacert # For network request
gitMinimal # For unplugin-info
nodejs
pnpm_10
pnpmConfigHook
];
buildPhase = ''
runHook preBuild
pnpm run build:packages
pnpm -F @proj-airi/stage-web run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r .cache/* "$out"
cp -r apps/stage-web/.cache/assets/* "$out"
runHook postInstall
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = builtins.readFile ./assets-hash.txt;
};
meta = {
description = "Self-hostable AI waifu / companion / VTuber";
longDescription = ''
AIRI is a soul container of AI waifu / virtual characters to bring them into our world,
wishing to achieve Neuro-sama's altitude. It's completely LLM and AI driven, capable of
realtime voice chat, playing Minecraft and Factorio. It can be run in browser or on desktop.
This is the desktop version.
'';
homepage = "https://github.com/moeru-ai/airi";
changelog = "https://github.com/moeru-ai/airi/releases/tag/v${final.version}";
# While airi itself is licensed under MIT, it uses the nonfree Cubism SDK. Whether it's
# redistributable remains a question, so we say it's not.
license = lib.licenses.unfree;
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
mainProgram = final.pname;
maintainers = with lib.maintainers; [ weathercold ];
};
})