From 5edd8aea77d38c7bf2d4d01b6573fb1057dc4114 Mon Sep 17 00:00:00 2001 From: Brandon Lucas Date: Fri, 13 Feb 2026 22:22:08 -0500 Subject: [PATCH] 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 --- flake.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 170a910..99776d9 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,10 @@ RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; shellHook = '' + # Build and add lux to PATH + cargo build --release --quiet 2>/dev/null + export PATH="$PWD/target/release:$PATH" + printf "\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 "\n" printf " \033[1mCommands:\033[0m\n" + printf " lux Start the REPL\n" + printf " lux \033[3m\033[0m Run a file\n" + printf " lux compile \033[3m\033[0m JIT compile and run\n" + printf "\n" + printf " \033[1mDevelopment:\033[0m\n" printf " cargo build Build the compiler\n" - printf " cargo run Start the REPL\n" printf " cargo test Run tests\n" - printf " cargo run -- \033[3m\033[0m Run a file\n" printf "\n" ''; };