From 4fb69ad4548855a6eca5e7ac29a798ac055f2bbb Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 13:00:45 -0500 Subject: [PATCH 01/16] Updated README.md to inclue NixFlake instructions --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index c439743cea5..e5d3a52794e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # T3 Code T3 Code is a minimal web GUI for coding agents (currently Codex, Claude, and OpenCode, more coming soon). @@ -40,6 +41,29 @@ brew install --cask t3-code yay -S t3code-bin ``` +#### NixOS (Flakes) + +```nix +# /path/to/your/flake.nix +{ + inputs = { + # This flake is pinned to nixpkgs stable + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + t3code-flake.url = "github:pingdotgg/t3code"; + t3code-flake.inputs.nixpkgs.follows = "nixpkgs"; + }; +} +``` +```nix +# /path/to/your/configuration.nix +{ + environment.systemPackages = [ + inputs.t3code-flake.packages."x86_64-linux".default; + ]; +} +``` + ## Some notes We are very very early in this project. Expect bugs. @@ -61,3 +85,4 @@ bun install . Read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening an issue or PR. Need support? Join the [Discord](https://discord.gg/jn4EGJjrvv). + From dfd815871400a956878f06d462411bd30e94e5fc Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 13:01:19 -0500 Subject: [PATCH 02/16] Added a Flake for building on NixOS machines using the flake option --- flake.lock | 44 ++++++++++++++++++++++++++++++++++++++ flake.nix | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000000..a228772e7d2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,44 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "t3code-src": "t3code-src" + } + }, + "t3code-src": { + "flake": false, + "locked": { + "lastModified": 1778827213, + "narHash": "sha256-lj871RSuJ82xulQAMcGW39x+LWPuNPoQIxEss6/UoKw=", + "owner": "pingdotgg", + "repo": "t3code", + "rev": "d1e85c4e8fdef82fbaded9539532b754080419e0", + "type": "github" + }, + "original": { + "owner": "pingdotgg", + "repo": "t3code", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..f67763e90cd --- /dev/null +++ b/flake.nix @@ -0,0 +1,63 @@ +{ + description = "T3 Code - A harness for coding agents"; + + inputs = { + # Pinned to stable to avoid breaking changes + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + # Track upstream repo - run `nix flake update` to check for changes + t3code-src = { + url = "github:pingdotgg/t3code"; + flake = false; + }; + }; + + outputs = { self, nixpkgs, t3code-src }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + + # Get version from upstream commit + version = t3code-src.shortRev or "latest"; + in + { + packages.${system}.default = + pkgs.stdenv.mkDerivation { + pname = "t3code"; + inherit version; + + src = t3code-src; + + # Build dependencies + nativeBuildInputs = with pkgs; [ + bun + nodejs + git + ]; + + configurePhase = '' + # Install dependencies + bun install --frozen-lockfile + ''; + + buildPhase = '' + # Build the desktop app + bun run build:desktop + ''; + + installPhase = '' + mkdir -p $out + # The build outputs to apps/desktop/dist or similar + find . -name "*.AppImage" -type f 2>/dev/null | head -1 | xargs -I {} cp {} $out/ || true + find . -name "t3code" -type f -executable 2>/dev/null | head -1 | xargs -I {} cp {} $out/bin/t3code || true + ''; + + meta = { + description = "T3 Code - A harness for coding agents"; + homepage = "https://t3.codes"; + license = pkgs.lib.licenses.mit; + platforms = [ system ]; + }; + }; + }; +} \ No newline at end of file From 5f0bfefa514ed8e0c5d3a6320824c68b50c34acf Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 13:38:00 -0500 Subject: [PATCH 03/16] Updated README.md to include the flake experimental feature toggle --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5d3a52794e..e3d719e4090 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,11 @@ yay -S t3code-bin }; } ``` + ```nix # /path/to/your/configuration.nix { + nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = [ inputs.t3code-flake.packages."x86_64-linux".default; ]; @@ -85,4 +87,3 @@ bun install . Read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening an issue or PR. Need support? Join the [Discord](https://discord.gg/jn4EGJjrvv). - From 42cd21ef32bebd4a309923430f251070bed13ead Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 13:52:25 -0500 Subject: [PATCH 04/16] Fix build: allow networking, improve install phase --- flake.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index f67763e90cd..7b114fe8003 100644 --- a/flake.nix +++ b/flake.nix @@ -35,9 +35,12 @@ git ]; + # Allow network for bun to fetch dependencies + allowNetworking = true; + configurePhase = '' # Install dependencies - bun install --frozen-lockfile + bun install ''; buildPhase = '' @@ -46,10 +49,21 @@ ''; installPhase = '' - mkdir -p $out - # The build outputs to apps/desktop/dist or similar - find . -name "*.AppImage" -type f 2>/dev/null | head -1 | xargs -I {} cp {} $out/ || true - find . -name "t3code" -type f -executable 2>/dev/null | head -1 | xargs -I {} cp {} $out/bin/t3code || true + mkdir -p $out/bin + + # Find and copy the built AppImage + APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) + if [ -n "$APPIMAGE" ]; then + cp "$APPIMAGE" "$out/t3code.AppImage" + chmod +x "$out/t3code.AppImage" + else + # Fallback: check other common locations + APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) + if [ -n "$APPIMAGE" ]; then + cp "$APPIMAGE" "$out/t3code.AppImage" + chmod +x "$out/t3code.AppImage" + fi + fi ''; meta = { From 9810cb0a80374d03254c25fd2516b2ca3f0a81ad Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 14:00:06 -0500 Subject: [PATCH 05/16] Fix build: multi-platform support, add PATH wrapper, fail on empty output --- flake.lock | 34 +++++++++++++++ flake.nix | 120 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 103 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index a228772e7d2..af671c5f2c9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1767313136, @@ -18,10 +36,26 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "t3code-src": "t3code-src" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "t3code-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 7b114fe8003..ac2e4a79ffc 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { # Pinned to stable to avoid breaking changes nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + flake-utils.url = "github:numtide/flake-utils"; # Track upstream repo - run `nix flake update` to check for changes t3code-src = { @@ -12,66 +13,83 @@ }; }; - outputs = { self, nixpkgs, t3code-src }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - - # Get version from upstream commit - version = t3code-src.shortRev or "latest"; - in - { - packages.${system}.default = - pkgs.stdenv.mkDerivation { - pname = "t3code"; - inherit version; + outputs = { self, nixpkgs, flake-utils, t3code-src }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + + # Get version from upstream commit + version = t3code-src.shortRev or "latest"; + in + { + packages.default = + pkgs.stdenv.mkDerivation { + pname = "t3code"; + inherit version; - src = t3code-src; + src = t3code-src; - # Build dependencies - nativeBuildInputs = with pkgs; [ - bun - nodejs - git - ]; + # Build dependencies + nativeBuildInputs = with pkgs; [ + bun + nodejs + git + ]; - # Allow network for bun to fetch dependencies - allowNetworking = true; - - configurePhase = '' - # Install dependencies - bun install - ''; + # Allow network for bun to fetch dependencies + allowNetworking = true; + + configurePhase = '' + # Install dependencies + bun install + ''; - buildPhase = '' - # Build the desktop app - bun run build:desktop - ''; + buildPhase = '' + # Build the desktop app + bun run build:desktop + ''; - installPhase = '' - mkdir -p $out/bin - - # Find and copy the built AppImage - APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) - if [ -n "$APPIMAGE" ]; then - cp "$APPIMAGE" "$out/t3code.AppImage" - chmod +x "$out/t3code.AppImage" - else - # Fallback: check other common locations - APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) + installPhase = '' + mkdir -p $out/bin + + # Find and copy the built AppImage + APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) if [ -n "$APPIMAGE" ]; then cp "$APPIMAGE" "$out/t3code.AppImage" chmod +x "$out/t3code.AppImage" + + # Create a wrapper script in $out/bin for PATH access + cat > $out/bin/t3code << 'WRAPPER' +#!/bin/sh +exec "$(dirname "$0")/../t3code.AppImage" "$@" +WRAPPER + chmod +x $out/bin/t3code + else + # Fallback: check other common locations + APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) + if [ -n "$APPIMAGE" ]; then + cp "$APPIMAGE" "$out/t3code.AppImage" + chmod +x "$out/t3code.AppImage" + + cat > $out/bin/t3code << 'WRAPPER' +#!/bin/sh +exec "$(dirname "$0")/../t3code.AppImage" "$@" +WRAPPER + chmod +x $out/bin/t3code + else + echo "ERROR: No AppImage found in build output" >&2 + exit 1 + fi fi - fi - ''; + ''; - meta = { - description = "T3 Code - A harness for coding agents"; - homepage = "https://t3.codes"; - license = pkgs.lib.licenses.mit; - platforms = [ system ]; + meta = { + description = "T3 Code - A harness for coding agents"; + homepage = "https://t3.codes"; + license = pkgs.lib.licenses.mit; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + }; }; - }; - }; + } + ); } \ No newline at end of file From c12b3c266eb2bec7b76b41f8732eeddd7f13c24c Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 14:08:58 -0500 Subject: [PATCH 06/16] Fix: Linux only platforms, simplify AppImage output --- flake.lock | 34 --------------- flake.nix | 124 ++++++++++++++++++++++++----------------------------- 2 files changed, 57 insertions(+), 101 deletions(-) diff --git a/flake.lock b/flake.lock index af671c5f2c9..a228772e7d2 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1767313136, @@ -36,26 +18,10 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "t3code-src": "t3code-src" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "t3code-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index ac2e4a79ffc..e18674eb526 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,6 @@ inputs = { # Pinned to stable to avoid breaking changes nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; - flake-utils.url = "github:numtide/flake-utils"; # Track upstream repo - run `nix flake update` to check for changes t3code-src = { @@ -13,83 +12,74 @@ }; }; - outputs = { self, nixpkgs, flake-utils, t3code-src }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - - # Get version from upstream commit - version = t3code-src.shortRev or "latest"; - in - { - packages.default = - pkgs.stdenv.mkDerivation { - pname = "t3code"; - inherit version; + outputs = { self, nixpkgs, t3code-src }: + let + lib = nixpkgs.lib; + systems = [ "x86_64-linux" "aarch64-linux" ]; + in + { + packages = builtins.listToAttrs ( + map (system: + let + pkgs = import nixpkgs { inherit system; }; + + # Get version from upstream commit + version = t3code-src.shortRev or "latest"; + + t3codePkg = pkgs.stdenv.mkDerivation { + pname = "t3code"; + inherit version; - src = t3code-src; + src = t3code-src; - # Build dependencies - nativeBuildInputs = with pkgs; [ - bun - nodejs - git - ]; + # Build dependencies + nativeBuildInputs = with pkgs; [ + bun + nodejs + git + ]; - # Allow network for bun to fetch dependencies - allowNetworking = true; - - configurePhase = '' - # Install dependencies - bun install - ''; + # Allow network for bun to fetch dependencies + allowNetworking = true; + + configurePhase = '' + # Install dependencies + bun install + ''; - buildPhase = '' - # Build the desktop app - bun run build:desktop - ''; + buildPhase = '' + # Build the desktop app + bun run build:desktop + ''; - installPhase = '' - mkdir -p $out/bin - - # Find and copy the built AppImage - APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) - if [ -n "$APPIMAGE" ]; then - cp "$APPIMAGE" "$out/t3code.AppImage" - chmod +x "$out/t3code.AppImage" + installPhase = '' + mkdir -p $out + + # Find the built AppImage + APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) + if [ -z "$APPIMAGE" ]; then + APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) + fi - # Create a wrapper script in $out/bin for PATH access - cat > $out/bin/t3code << 'WRAPPER' -#!/bin/sh -exec "$(dirname "$0")/../t3code.AppImage" "$@" -WRAPPER - chmod +x $out/bin/t3code - else - # Fallback: check other common locations - APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) if [ -n "$APPIMAGE" ]; then - cp "$APPIMAGE" "$out/t3code.AppImage" - chmod +x "$out/t3code.AppImage" - - cat > $out/bin/t3code << 'WRAPPER' -#!/bin/sh -exec "$(dirname "$0")/../t3code.AppImage" "$@" -WRAPPER - chmod +x $out/bin/t3code + cp "$APPIMAGE" "$out/t3code" + chmod +x "$out/t3code" else echo "ERROR: No AppImage found in build output" >&2 exit 1 fi - fi - ''; + ''; - meta = { - description = "T3 Code - A harness for coding agents"; - homepage = "https://t3.codes"; - license = pkgs.lib.licenses.mit; - platforms = [ "x86_64-linux" "aarch64-linux" ]; + meta = { + description = "T3 Code - A harness for coding agents"; + homepage = "https://t3.codes"; + license = pkgs.lib.licenses.mit; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + }; }; - }; - } - ); + in + lib.nameValuePair system t3codePkg + ) systems + ); + }; } \ No newline at end of file From 0fe280ff8e54ff2799cdfacce21bd57aacd1c920 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 14:27:33 -0500 Subject: [PATCH 07/16] Fix: use pre-built AppImage to avoid network sandbox issues --- flake.nix | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/flake.nix b/flake.nix index e18674eb526..f398d88d05e 100644 --- a/flake.nix +++ b/flake.nix @@ -26,48 +26,31 @@ # Get version from upstream commit version = t3code-src.shortRev or "latest"; - t3codePkg = pkgs.stdenv.mkDerivation { + t3codeDerivation = pkgs.stdenv.mkDerivation { pname = "t3code"; inherit version; - src = t3code-src; + # Use latest release from GitHub - update hash when release changes + src = pkgs.fetchurl { + url = "https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage"; + sha256 = "sha256-qMPSxQuiCwLT0As1foSDqaKoNMoLrjbKbDSwQW56T7g="; + }; - # Build dependencies + # Build dependencies for appimage-run nativeBuildInputs = with pkgs; [ - bun - nodejs - git + appimage-run ]; - # Allow network for bun to fetch dependencies - allowNetworking = true; - - configurePhase = '' - # Install dependencies - bun install - ''; - - buildPhase = '' - # Build the desktop app - bun run build:desktop - ''; + # Don't strip - AppImages are ELF with appended squashfs + dontStrip = true; + dontBuild = true; + dontConfigure = true; + dontUnpack = true; installPhase = '' mkdir -p $out - - # Find the built AppImage - APPIMAGE=$(find . -path "*/dist/*" -name "*.AppImage" -type f 2>/dev/null | head -1) - if [ -z "$APPIMAGE" ]; then - APPIMAGE=$(find . -name "*.AppImage" -type f 2>/dev/null | head -1) - fi - - if [ -n "$APPIMAGE" ]; then - cp "$APPIMAGE" "$out/t3code" - chmod +x "$out/t3code" - else - echo "ERROR: No AppImage found in build output" >&2 - exit 1 - fi + # Extract AppImage to $out + appimage-run -x $out $src ''; meta = { @@ -78,7 +61,7 @@ }; }; in - lib.nameValuePair system t3codePkg + lib.nameValuePair system t3codeDerivation ) systems ); }; From 5a2ef68f7b93d5284165e21fc045c6332105e7a5 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 15:01:36 -0500 Subject: [PATCH 08/16] Refactor: clean up flake with maintainer-friendly variables - Add clear sections for releases, download hash, and platforms - Update hash by running: nix hash url - Only support x86_64-linux (no ARM AppImage available) - Simplify code for easier maintenance --- flake.nix | 101 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/flake.nix b/flake.nix index f398d88d05e..dcfd555c224 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,15 @@ { description = "T3 Code - A harness for coding agents"; + # ===== MAINTENANCE NOTES FOR MAINTAINERS ===== + # To update to a new release: + # 1. Update `releaseTag` below (e.g., "v0.0.24") + # 2. Update `appimageHash` by running: nix hash url + # 3. Optionally update `supportedSystems` if architecture support changes + # ============================================== + inputs = { - # Pinned to stable to avoid breaking changes nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; - - # Track upstream repo - run `nix flake update` to check for changes t3code-src = { url = "github:pingdotgg/t3code"; flake = false; @@ -15,54 +19,61 @@ outputs = { self, nixpkgs, t3code-src }: let lib = nixpkgs.lib; - systems = [ "x86_64-linux" "aarch64-linux" ]; + + # ----- RELEASES ----- + # Update this to the new version when a new release is published + # Format: "vX.Y.Z" (must match the GitHub release tag) + releaseTag = "v0.0.23"; + + # ----- DOWNLOAD ----- + # Update this hash when the AppImage URL changes + # Run: nix hash url https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage + appimageHash = "sha256-qMPSxQuiCwLT0As1foSDqaKoNMoLrjbKbDSwQW56T7g="; + + # ----- PLATFORMS ----- + # Currently only x86_64-linux is supported (no ARM AppImage available) + supportedSystems = [ "x86_64-linux" ]; + + # ----- DERIVATION ----- + pkgs = import nixpkgs { system = "x86_64-linux"; }; + version = lib.removePrefix "v" releaseTag; + + appimage = pkgs.fetchurl { + url = "https://github.com/pingdotgg/t3code/releases/download/${releaseTag}/T3-Code-${version}-x86_64.AppImage"; + sha256 = appimageHash; + }; in { - packages = builtins.listToAttrs ( - map (system: - let - pkgs = import nixpkgs { inherit system; }; - - # Get version from upstream commit - version = t3code-src.shortRev or "latest"; - - t3codeDerivation = pkgs.stdenv.mkDerivation { - pname = "t3code"; - inherit version; + packages.x86_64-linux = pkgs.stdenv.mkDerivation { + pname = "t3code"; + inherit version; + + src = appimage; - # Use latest release from GitHub - update hash when release changes - src = pkgs.fetchurl { - url = "https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage"; - sha256 = "sha256-qMPSxQuiCwLT0As1foSDqaKoNMoLrjbKbDSwQW56T7g="; - }; + dontStrip = true; + dontUnpack = true; - # Build dependencies for appimage-run - nativeBuildInputs = with pkgs; [ - appimage-run - ]; + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/t3code.AppImage + chmod +x $out/bin/t3code.AppImage - # Don't strip - AppImages are ELF with appended squashfs - dontStrip = true; - dontBuild = true; - dontConfigure = true; - dontUnpack = true; + # Launcher: uses appimage-run to execute the AppImage + cat > $out/bin/t3code << 'LAUNCHER' + #!/bin/sh + exec appimage-run "$(dirname "$0")/t3code.AppImage" "$@" + LAUNCHER + chmod +x $out/bin/t3code + ''; - installPhase = '' - mkdir -p $out - # Extract AppImage to $out - appimage-run -x $out $src - ''; + meta = { + description = "T3 Code - A harness for coding agents"; + homepage = "https://t3.codes"; + license = pkgs.lib.licenses.mit; + platforms = supportedSystems; + }; + }; - meta = { - description = "T3 Code - A harness for coding agents"; - homepage = "https://t3.codes"; - license = pkgs.lib.licenses.mit; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - }; - }; - in - lib.nameValuePair system t3codeDerivation - ) systems - ); + defaultPackage = self.packages.x86_64-linux; }; } \ No newline at end of file From 5f8bb4595cf0a0fabecbd307c7852c12a0318b68 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 15:13:48 -0500 Subject: [PATCH 09/16] corrected the instalation paths --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3d719e4090..1a7e50e26d2 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ yay -S t3code-bin { nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = [ - inputs.t3code-flake.packages."x86_64-linux".default; + pkgs.appimage-run + inputs.t3code-flake.packages.${system} ]; } ``` From 0d1b898e123131cb2265adc5c77bf8fe102cf87f Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 15:55:36 -0500 Subject: [PATCH 10/16] fix: stale t3code-src flake input --- flake.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index dcfd555c224..0ca89573484 100644 --- a/flake.nix +++ b/flake.nix @@ -10,13 +10,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; - t3code-src = { - url = "github:pingdotgg/t3code"; - flake = false; - }; }; - outputs = { self, nixpkgs, t3code-src }: + outputs = + { self, nixpkgs }: let lib = nixpkgs.lib; @@ -76,4 +73,4 @@ defaultPackage = self.packages.x86_64-linux; }; -} \ No newline at end of file +} From 2a1eb1e66431e561b2f4cc653e187a9c6db7ba1f Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 18:20:57 -0500 Subject: [PATCH 11/16] updated to v0.0.24 --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0ca89573484..431b14ffe75 100644 --- a/flake.nix +++ b/flake.nix @@ -20,12 +20,12 @@ # ----- RELEASES ----- # Update this to the new version when a new release is published # Format: "vX.Y.Z" (must match the GitHub release tag) - releaseTag = "v0.0.23"; + releaseTag = "v0.0.24"; # ----- DOWNLOAD ----- # Update this hash when the AppImage URL changes # Run: nix hash url https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage - appimageHash = "sha256-qMPSxQuiCwLT0As1foSDqaKoNMoLrjbKbDSwQW56T7g="; + appimageHash = "sha256-b7c29802d69029698254e3b0bc7072a2c628a9bd098b7e507b89bef06b69ffe9"; # ----- PLATFORMS ----- # Currently only x86_64-linux is supported (no ARM AppImage available) From 01f0ee60c75ec3bb4401eb710488d6d4fce95e0c Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 18:22:07 -0500 Subject: [PATCH 12/16] updated to v0.0.24 --- flake.lock | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index a228772e7d2..ab429ceebf6 100644 --- a/flake.lock +++ b/flake.lock @@ -18,24 +18,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "t3code-src": "t3code-src" - } - }, - "t3code-src": { - "flake": false, - "locked": { - "lastModified": 1778827213, - "narHash": "sha256-lj871RSuJ82xulQAMcGW39x+LWPuNPoQIxEss6/UoKw=", - "owner": "pingdotgg", - "repo": "t3code", - "rev": "d1e85c4e8fdef82fbaded9539532b754080419e0", - "type": "github" - }, - "original": { - "owner": "pingdotgg", - "repo": "t3code", - "type": "github" + "nixpkgs": "nixpkgs" } } }, From 1bed46e012563540594f10be3afef4ab2e4f4995 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sat, 16 May 2026 19:00:39 -0500 Subject: [PATCH 13/16] updated the sha --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 431b14ffe75..70571b20ba1 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ # ----- DOWNLOAD ----- # Update this hash when the AppImage URL changes # Run: nix hash url https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage - appimageHash = "sha256-b7c29802d69029698254e3b0bc7072a2c628a9bd098b7e507b89bef06b69ffe9"; + appimageHash = "sha256-t8KYAtaQKWmCVOOwvHByosYoqb0Ji35Qe4m+8Gtp/+k="; # ----- PLATFORMS ----- # Currently only x86_64-linux is supported (no ARM AppImage available) From 91cd9fa3592cf2f4fe02b0583682a54e03699a0c Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sun, 17 May 2026 15:01:55 -0500 Subject: [PATCH 14/16] Simplified build logic and maintainer notes, and removed fluff comments --- flake.nix | 75 +++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index 70571b20ba1..dcb7f68201e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,20 @@ description = "T3 Code - A harness for coding agents"; # ===== MAINTENANCE NOTES FOR MAINTAINERS ===== + # + # let + # releaseTag = "v0.0.24"; + # version = lib.removePrefix "v" releaseTag; + # appimageHash = "sha256-t8KYAtaQKWmCVOOwvHByosYoqb0Ji35Qe4m+8Gtp/+k="; + # in + # { + # . . . + # }; + # # To update to a new release: - # 1. Update `releaseTag` below (e.g., "v0.0.24") - # 2. Update `appimageHash` by running: nix hash url - # 3. Optionally update `supportedSystems` if architecture support changes + # 1. Update `releaseTag` to the new version (e.g., "v0.0.25") + # 2. Update `appimageHash`: + # nix-prefetch-url https://github.com/pingdotgg/t3code/releases/download/v0.0.25/T3-Code-0.0.25-x86_64.AppImage # ============================================== inputs = { @@ -17,23 +27,13 @@ let lib = nixpkgs.lib; - # ----- RELEASES ----- - # Update this to the new version when a new release is published - # Format: "vX.Y.Z" (must match the GitHub release tag) releaseTag = "v0.0.24"; - - # ----- DOWNLOAD ----- - # Update this hash when the AppImage URL changes - # Run: nix hash url https://github.com/pingdotgg/t3code/releases/download/v0.0.23/T3-Code-0.0.23-x86_64.AppImage + version = lib.removePrefix "v" releaseTag; appimageHash = "sha256-t8KYAtaQKWmCVOOwvHByosYoqb0Ji35Qe4m+8Gtp/+k="; - # ----- PLATFORMS ----- - # Currently only x86_64-linux is supported (no ARM AppImage available) supportedSystems = [ "x86_64-linux" ]; - # ----- DERIVATION ----- pkgs = import nixpkgs { system = "x86_64-linux"; }; - version = lib.removePrefix "v" releaseTag; appimage = pkgs.fetchurl { url = "https://github.com/pingdotgg/t3code/releases/download/${releaseTag}/T3-Code-${version}-x86_64.AppImage"; @@ -41,36 +41,35 @@ }; in { - packages.x86_64-linux = pkgs.stdenv.mkDerivation { - pname = "t3code"; - inherit version; + packages.x86_64-linux = { + default = pkgs.stdenv.mkDerivation { + pname = "t3code"; + inherit version; - src = appimage; + src = appimage; - dontStrip = true; - dontUnpack = true; + dontStrip = true; + dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - cp $src $out/bin/t3code.AppImage - chmod +x $out/bin/t3code.AppImage + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/t3code.AppImage + chmod +x $out/bin/t3code.AppImage - # Launcher: uses appimage-run to execute the AppImage - cat > $out/bin/t3code << 'LAUNCHER' - #!/bin/sh - exec appimage-run "$(dirname "$0")/t3code.AppImage" "$@" - LAUNCHER - chmod +x $out/bin/t3code - ''; + cat > $out/bin/t3code << 'LAUNCHER' + #!/bin/sh + exec appimage-run "$(dirname "$0")/t3code.AppImage" "$@" + LAUNCHER + chmod +x $out/bin/t3code + ''; - meta = { - description = "T3 Code - A harness for coding agents"; - homepage = "https://t3.codes"; - license = pkgs.lib.licenses.mit; - platforms = supportedSystems; + meta = { + description = "T3 Code - A harness for coding agents"; + homepage = "https://t3.codes"; + license = lib.licenses.mit; + platforms = supportedSystems; + }; }; }; - - defaultPackage = self.packages.x86_64-linux; }; } From 09f2ab4dbff151cb913bf09492b0b0a9a291cee2 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sun, 17 May 2026 15:03:32 -0500 Subject: [PATCH 15/16] Updated installation instructions to include the updated package, and an example for pinning the releaseTag. (Currently wired for 0.0.24) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a7e50e26d2..bb3ededa016 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,9 @@ yay -S t3code-bin t3code-flake.url = "github:pingdotgg/t3code"; t3code-flake.inputs.nixpkgs.follows = "nixpkgs"; + + # Optional: pin to a specific release + # t3code-flake.releaseTag = "v0.0.23"; }; } ``` @@ -62,7 +65,7 @@ yay -S t3code-bin nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = [ pkgs.appimage-run - inputs.t3code-flake.packages.${system} + inputs.t3code-flake.packages.${system}.default ]; } ``` From 911b65237321de54c42c8de33dbcc0eeb6668a17 Mon Sep 17 00:00:00 2001 From: Khitboksy Date: Sun, 17 May 2026 16:42:42 -0500 Subject: [PATCH 16/16] Fixed override syntax --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bb3ededa016..a1742eebedf 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,9 @@ yay -S t3code-bin # This flake is pinned to nixpkgs stable nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; - t3code-flake.url = "github:pingdotgg/t3code"; + t3code-flake.url = "github:pingdotgg/t3code"; + # Or pin a version: "github:pingdotgg/t3code?ref=v0.0.23" t3code-flake.inputs.nixpkgs.follows = "nixpkgs"; - - # Optional: pin to a specific release - # t3code-flake.releaseTag = "v0.0.23"; }; } ```