From 11842e76373aed339c6e0e0ee1c8cb49f5a3b622 Mon Sep 17 00:00:00 2001 From: dusk Date: Sat, 4 Jan 2025 00:45:48 +0900 Subject: [PATCH] build(nix): dont forget to copy commands lib for bot to use --- flake.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 58aa5a2b..dc5d11c3 100644 --- a/flake.nix +++ b/flake.nix @@ -103,8 +103,13 @@ ]; text = '' set -x - [ "''${1:-}" == "" ] && cargo build --package commands --release - uniffi-bindgen-cs "''${1:-target/release/libcommands.so}" --library --out-dir="''${2:-./PluralKit.Bot}" + commandslib="''${1:-}" + if [ "$commandslib" == "" ]; then + cargo build --package commands --release + commandslib="target/release/libcommands.so" + fi + uniffi-bindgen-cs "$commandslib" --library --out-dir="''${2:-./PluralKit.Bot}" + cp -f "$commandslib" obj/ ''; }; };