build(nix): actually make sure libcommands.so is outputted to correct dir (obj)

This commit is contained in:
dusk 2025-01-05 01:52:19 +09:00
parent 00ba1753a2
commit 2027da40ad
No known key found for this signature in database

View file

@ -90,11 +90,12 @@
set -x set -x
commandslib="''${1:-}" commandslib="''${1:-}"
if [ "$commandslib" == "" ]; then if [ "$commandslib" == "" ]; then
cargo build --package commands --release cargo -Z unstable-options build --package commands --release --artifact-dir obj/
commandslib="target/release/libcommands.so" commandslib="obj/libcommands.so"
else
cp -f "$commandslib" obj/
fi fi
uniffi-bindgen-cs "$commandslib" --library --out-dir="''${2:-./PluralKit.Bot}" uniffi-bindgen-cs "$commandslib" --library --out-dir="''${2:-./PluralKit.Bot}"
cp -f "$commandslib" obj/
''; '';
}; };
}; };
@ -204,7 +205,7 @@
set -x set -x
${pluralkitConfCheck} ${pluralkitConfCheck}
${self'.apps.generate-command-parser-bindings.program} ${self'.apps.generate-command-parser-bindings.program}
dotnet build -c Release -o obj/ dotnet build ./PluralKit.Bot/PluralKit.Bot.csproj -c Release -o obj/
exec dotnet obj/PluralKit.Bot.dll exec dotnet obj/PluralKit.Bot.dll
''; '';
}; };