From 061649cb0775be47dada4298f77a233a7a25d143 Mon Sep 17 00:00:00 2001 From: Johannes Kresner Date: Sun, 15 Nov 2026 16:13:16 +0100 Subject: [PATCH] chore: add depencencies to readme and flake --- README.md | 6 ++++++ devenv.nix | 2 +- flake.nix | 8 ++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5359fca..2083e92 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ hx -r # pick a session to resume hx -r parser # resume the session whose title best matches "parser" ``` +## Dependencies + +- Rust toolchain (to build from source; `cmake` and `perl` may be needed for the TLS stack). +- `git`. +- Linux: [`bubblewrap`](https://github.com/containers/bubblewrap) (`bwrap`) on `PATH` (`apt install bubblewrap`, `pacman -S bubblewrap`, `dnf install bubblewrap`). The Nix package wraps `hx` so it is provided automatically. + TUI: `enter` send, `shift-enter`/`alt-enter`/`ctrl-j` newline (or end a line with `\` and press enter), `esc` abort, `ctrl-o` expand tool output. Shift-enter needs a terminal that reports it; hx turns on the kitty keyboard protocol when the terminal answers the probe. Works in ghostty, kitty, WezTerm (`enable_kitty_keyboard = true`), iTerm2, foot, Alacritty 0.13+, Windows Terminal (map shift-enter to `\u001b[13;2u`) and zellij 0.41+. tmux 3.2+ needs `set -g extended-keys on` and `set -g extended-keys-format csi-u`. Elsewhere use `alt-enter`, `ctrl-j` or a trailing `\`. `/keys` prints every key as hx receives it, to see what a terminal or multiplexer (e.g. herdr) passes through. Long input lines wrap; the box grows up to 10 rows. diff --git a/devenv.nix b/devenv.nix index d7ade3e..8651db0 100644 --- a/devenv.nix +++ b/devenv.nix @@ -11,7 +11,7 @@ packages = [ pkgs.git pkgs.stdenv.cc - ]; + ] ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.bubblewrap; languages.rust.enable = true; } diff --git a/flake.nix b/flake.nix index ea1db12..bbeecfb 100644 --- a/flake.nix +++ b/flake.nix @@ -31,8 +31,12 @@ # ponytail: tests skipped (need git/network); enable when hermetic. doCheck = false; # rustls may build aws-lc-sys (cmake) depending on feature set. - nativeBuildInputs = [ pkgs.cmake pkgs.perl ]; + nativeBuildInputs = [ pkgs.cmake pkgs.perl ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.makeWrapper ]; dontUseCmakeConfigure = true; + # bubblewrap sandbox runtime dependency (Linux only). + postInstall = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux '' + wrapProgram $out/bin/hx --suffix PATH : ${pkgs.lib.makeBinPath [ pkgs.bubblewrap ]} + ''; meta = { description = "Minimal Rust coding agent using existing subscriptions"; license = pkgs.lib.licenses.unlicense; @@ -67,7 +71,7 @@ devShells = forAll (pkgs: { default = pkgs.mkShell { - packages = with pkgs; [ cargo rustc clippy rustfmt rust-analyzer git ]; + packages = with pkgs; [ cargo rustc clippy rustfmt rust-analyzer git ] ++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.bubblewrap; }; }); };