diff --git a/.github/workflows/README.md b/.github/workflows/README.md index a9d7ea69..21278c29 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -82,7 +82,8 @@ the job sets from its own token. Run them locally with `bats tests`, or no longer matches the inputs fails. nixfmt, from the flake's own nixpkgs, checks every `*.nix` file. - **shell:** builds the dev shell on each system (Linux x86_64 and arm64, and - an Apple Silicon Mac) and checks `jj` and `just` run inside. + an Apple Silicon Mac) and checks `jj`, `just` and `tb` run inside. `tb` is + built from source, so this is also its only build on darwin and arm64. - **home:** switches the devcontainer profile for a `vscode` user that already has a `~/.zshrc`, like the image's oh-my-zsh one. home-manager must take it over, keeping the old one as `~/.zshrc.backup`. Then diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index bd569cca..67640a85 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1 - name: Dev shell - run: nix develop --no-update-lock-file -c sh -c 'jj --version && just --version' + run: nix develop --no-update-lock-file -c sh -c 'jj --version && just --version && tb --version' # The devcontainer profile, switched for a real vscode user whose ~/.zshrc # already exists, as the image's oh-my-zsh one does: home-manager takes it diff --git a/lib/packages.nix b/lib/packages.nix index bfd91e97..21962933 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -17,6 +17,28 @@ let patches = [ ]; postInstall = "installManPage doc/cheat.1"; }); + + # taskbook's Rust port (mise has it as github:taskbook-sh/taskbook). Its own + # overlay.nix installs the release binaries as they are, which on Linux ask + # for /lib64/ld-linux and so don't run on NixOS; built from source instead. + # The workspace's server (axum, sqlx, Postgres) is left out. + taskbook = pkgs.rustPlatform.buildRustPackage (finalAttrs: { + pname = "taskbook"; + version = "1.5.0"; + src = pkgs.fetchFromGitHub { + owner = "taskbook-sh"; + repo = "taskbook"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zG/w3xUg6dicFFx1Bd/fcsRAS6RxibPp8mwB9fy5fog="; + }; + cargoHash = "sha256-NLuOE7rdvgqPOEa06u36b+EmWOLWEC3ygJM8lo19ksQ="; + cargoBuildFlags = [ "--package=taskbook-client" ]; + cargoTestFlags = [ + "--package=taskbook-client" + "--package=taskbook-common" + ]; + meta.mainProgram = "tb"; + }); in [ pkgs.bat @@ -27,6 +49,7 @@ in pkgs.gh pkgs.claude-code pkgs.tmux + taskbook # formatters for `jj fix` pkgs.taplo pkgs.rumdl diff --git a/tools/mise/global.toml b/tools/mise/global.toml index 73a5acd9..56c5bddd 100644 --- a/tools/mise/global.toml +++ b/tools/mise/global.toml @@ -1,5 +1,10 @@ -# Global mise tools, linked to ~/.config/mise/conf.d/dotfiles.toml: only what -# the global justfile needs outside this repo. The repo's own tools stay in the -# root mise.toml. +# Global mise tools, linked to ~/.config/mise/conf.d/dotfiles.toml: the few +# tools needed outside this repo. The repo's own tools stay in the root +# mise.toml. [tools] +# The global justfile's recipes. just = "latest" +# taskbook (`tb`), from the Rust port: one binary instead of the original's +# Node runtime, same ~/.taskbook data format. Its sync swaps local storage for +# a server, with no offline copy, so it stays off. +"github:taskbook-sh/taskbook" = "1.5"