From bdc7d14c6d7ff2193b7e260d6b9806b7f4b84d2f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 24 Apr 2026 20:25:33 +0300 Subject: [PATCH] Document flake outputs and usage - Describe exported packages, apps, and checks - Add build, run, and flake inspection examples --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4684f1c --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# t3code-flake + +Standalone Nix packaging for [`pingdotgg/t3code`](https://github.com/pingdotgg/t3code). + +This repository does not rely on upstream Nix packaging. It fetches the upstream source as a non-flake input and builds local package expressions around that source tree. + +## What It Exports + +For each supported system, the flake exports: + +- `packages..t3code-server` +- `packages..t3code-desktop` +- `packages..default` +- `apps..t3code-server` +- `apps..t3code-desktop` +- `apps..default` +- `checks..t3code-server` +- `checks..t3code-desktop` + +Current `default` points to the desktop package/app. + +## Usage + +Build the server package: + +```bash +nix build .#t3code-server +``` + +Build the desktop package: + +```bash +nix build .#t3code-desktop +``` + +Run the server app: + +```bash +nix run .#t3code-server +``` + +Run the desktop app: + +```bash +nix run .#t3code-desktop +``` + +Inspect the flake surface: + +```bash +nix flake show --all-systems +``` + +## Layout + +```text +. +├── flake.nix +├── flake.lock +├── README.md +└── packages + ├── common.nix + ├── desktop + │ ├── build-nix-desktop-package.mjs + │ ├── default.nix + │ └── desktop-nix-autoupdate.patch + └── server + └── default.nix +``` + +## Notes + +- `packages/common.nix` contains the shared Bun workspace and `node-pty` setup used by both packages. +- `packages/desktop/build-nix-desktop-package.mjs` is local packaging glue carried by this repo. +- `packages/desktop/desktop-nix-autoupdate.patch` is a downstream patch for desktop auto-update messaging in package-managed installs. +- Upstream source is pinned in `flake.lock` via the `t3code` input.