From 536da04b8170a331019d688dd6a76b8454cdff72 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Sat, 18 Jul 2026 15:00:16 -0700 Subject: [PATCH] b4: expose misc/ source tree via passthru.src-misc b4 ships editor helpers (Vim/Emacs syntax highlighting for the `b4 review` reply editor) and an `agent-reviewer.md` prompt under `misc/` in its source tree, but these files are absent from the PyPI sdist the package is built from. Fetch the matching git tag and expose it as `passthru.src-misc` so downstream consumers (starting with the `b4-review-vim` plugin) can reuse it instead of each fetching the repository themselves. Pinning `rev` to `v${version}` keeps it in sync with the packaged version. Assisted-by: Claude Code (Claude Opus 4.8) --- pkgs/by-name/b4/b4/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/b4/b4/package.nix b/pkgs/by-name/b4/b4/package.nix index 102cb1dc904d..74d0441c3786 100644 --- a/pkgs/by-name/b4/b4/package.nix +++ b/pkgs/by-name/b4/b4/package.nix @@ -2,6 +2,7 @@ lib, python3Packages, fetchPypi, + fetchgit, patatt, }: @@ -31,6 +32,15 @@ python3Packages.buildPythonApplication (finalAttrs: { textual ]; + passthru = { + src-misc = fetchgit { + url = "https://git.kernel.org/pub/scm/utils/b4/b4.git"; + rev = "v${finalAttrs.version}"; + hash = "sha256-NjYL3RKQpjDkU98qbXyl/cvLTJYVAfIowm8E2Rg8AgI="; + fetchSubmodules = false; + }; + }; + meta = { homepage = "https://git.kernel.org/pub/scm/utils/b4/b4.git/about"; license = lib.licenses.gpl2Only;