chore: fix flake.nix rebuild detection

Better source change detection using find instead of single file check.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 03:54:36 -05:00
parent cda2e9213a
commit 26d340b5a3
2 changed files with 41 additions and 16 deletions

View File

@@ -31,7 +31,7 @@
shellHook = ''
# Build and add lux to PATH
if [ ! -f target/release/lux ] || [ Cargo.toml -nt target/release/lux ] || [ src/main.rs -nt target/release/lux ]; then
if [ ! -f target/release/lux ] || [ Cargo.toml -nt target/release/lux ] || [ -n "$(find src -name '*.rs' -newer target/release/lux 2>/dev/null | head -1)" ]; then
echo "Building lux..."
cargo build --release
fi