From 73594460af5512cc70a9ea9393b0f222db2317a4 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Mon, 10 Aug 2026 08:27:43 +0300 Subject: [PATCH] docs: improve README --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ff11c6d..298f7b1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + # OpenCode Nix Flake This repository packages [OpenCode](https://github.com/sst/opencode), a terminal-based AI assistant for developers, as a Nix flake. OpenCode is developed by SST (Serverless Stack) and provides powerful AI-powered coding assistance directly in your terminal. @@ -39,14 +41,13 @@ nix profile install github:aodhanhayter/opencode-flake ## Packaging -This flake builds OpenCode from source, copying the approach from the official nixpkgs build. If you don't require the latest version of opencode, I recommend using the official nixpkgs version as it will likely be more stable and well tested. +This flake packages OpenCode by downloading **pre-built binaries** from the npm registry, rather than building from source. If you don't require the latest version of opencode, I recommend using the official nixpkgs version as it will likely be more stable and well tested. -- **Source-based builds**: Fetches source code directly from the [sst/opencode](https://github.com/sst/opencode) repository -- **Multi-component build system**: - - **Go TUI Component**: Builds the terminal UI (`packages/tui`) using `buildGoModule` - - **TypeScript Core**: Uses Bun to compile the main application logic -- **Deterministic builds**: Includes a local models patch to avoid network dependencies during build -- **Cross-platform support**: Supports all major platforms with proper platform-specific library linking +- **Binary-based packaging**: Downloads pre-compiled tarballs directly from the npm registry +- **Platform-specific binaries**: Correctly maps and unpacks binaries for each supported system (`opencode-ai` plus platform-specific packages) +- **FHS directory structure**: Creates a proper Linux filesystem hierarchy structure in the Nix store +- **Environment setup**: Uses `makeWrapper` to configure necessary environment variables for the binary +- **Cross-platform support**: Supports all major platforms with proper architecture-to-system mapping ## Development