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)
This commit is contained in:
Farid Zakaria
2026-07-22 17:24:31 -07:00
parent 5e8ca42db8
commit 536da04b81
+10
View File
@@ -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;