Package t3tui itself as a flake output (packages.t3tui / apps.t3tui)

Builds one self-contained binary with `bun build --compile`. npm deps
come from a fixed-output derivation (this nixpkgs has no bun fetcher);
the vendored t3code submodule is grafted from a pinned flake input
(same commit as the submodule) because git flake sources don't include
submodule contents. The binary is a Bun SEA, so strip/patchelf are
disabled on the package. link-vendor now chmods copied vendor files
writable before patching (nix store sources are read-only).

Verified: nix build .#t3tui -> bin/t3tui version prints 0.2.0.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
venomadeandmistral-vibe Bot committed 2026-11-24 01:42:25 +00:00
1 parent 9d1f6d8bc9
commit c5311a763f
3 files changed
+129 -6

No files matched your search

+6 -2
View File
@@ -2,7 +2,7 @@
// their package export maps resolve. They are TypeScript sources Bun runs as-is.
// The packages are copied (not symlinked) so the small set of classic-tsc
// false positives below can be patched in the copy; vendor/ itself stays pristine.
import { cp, lstat, mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
import { chmod, cp, lstat, mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
import { join } from "node:path";
const root = join(import.meta.dir, "..");
@@ -30,7 +30,11 @@ const tscPatches: ReadonlyArray<{ file: string; from: string; to: string }> = [
for (const { file, from, to } of tscPatches) {
const path = join(scopeDir, file);
const source = await readFile(path, "utf8");
if (source.includes(from)) await writeFile(path, source.replace(from, to));
// Copies keep the source's mode; a read-only store path (nix flake input) must be writable here.
if (source.includes(from)) {
await chmod(path, 0o644);
await writeFile(path, source.replace(from, to));
}
}
// Upstream resolves "@pierre/words/core" and "@pierre/words/wasm" through its web app's