feat: add lux to PATH on shell entry

- Build release binary when entering nix shell
- Add target/release to PATH automatically
- Update shell help to show lux commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 22:22:08 -05:00
parent 705bd57e81
commit 5edd8aea77

View File

@@ -30,6 +30,10 @@
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
shellHook = '' shellHook = ''
# Build and add lux to PATH
cargo build --release --quiet 2>/dev/null
export PATH="$PWD/target/release:$PATH"
printf "\n" printf "\n"
printf " \033[1;35m \033[0m\n" printf " \033[1;35m \033[0m\n"
printf " \033[1;35m \033[0m\n" printf " \033[1;35m \033[0m\n"
@@ -38,10 +42,13 @@
printf " Functional language with first-class effects\n" printf " Functional language with first-class effects\n"
printf "\n" printf "\n"
printf " \033[1mCommands:\033[0m\n" printf " \033[1mCommands:\033[0m\n"
printf " lux Start the REPL\n"
printf " lux \033[3m<file.lux>\033[0m Run a file\n"
printf " lux compile \033[3m<file.lux>\033[0m JIT compile and run\n"
printf "\n"
printf " \033[1mDevelopment:\033[0m\n"
printf " cargo build Build the compiler\n" printf " cargo build Build the compiler\n"
printf " cargo run Start the REPL\n"
printf " cargo test Run tests\n" printf " cargo test Run tests\n"
printf " cargo run -- \033[3m<file.lux>\033[0m Run a file\n"
printf "\n" printf "\n"
''; '';
}; };